Tutorials Courses Interview Prep (100 Q&A) AI Tools (50) Developer Tools (50) Tracks Pricing Plans Blog & Articles Contact Us
Nuxt 3 Production & Server Architecture 16 mins read Free Lesson

Nuxt 3 Multi-Language Internationalization (i18n)

Configure localized routing, translated locale message files, and switch language dynamically.

Nuxt i18n Configuration

<script setup>
const { locale, setLocale, t } = useI18n()
</script>

<template>
    <h1>{{ t('welcome_message') }}</h1>
    <button @click="setLocale('en')">English</button>
    <button @click="setLocale('es')">Español</button>
</template>