--- title: Internationalization (i18n) description: 'Learn how to internationalize your Nuxt app with multi-directional support (LTR/RTL).' framework: nuxt navigation.icon: i-lucide-languages --- ::callout{to="/getting-started/i18n/vue" icon="i-logos-vue" class="hidden"} Looking for the **Vue** version? :: ## Usage ::note{to="/components/app"} Nuxt UI provides an **App** component that wraps your app to provide global configurations. :: ### Locale ::module-only #ui :::div Use the `locale` prop with the locale you want to use from `@nuxt/ui/locale`: ```vue [app.vue] ``` ::: #ui-pro :::div Use the `locale` prop with the locale you want to use from `@nuxt/ui-pro/locale`: ```vue [app.vue] ``` ::: :: ### Custom locale You can create your own locale using the `defineLocale` composable: ::module-only #ui :::div ```vue [app.vue] ``` ::: #ui-pro :::div ```vue [app.vue] ``` ::: :: ::tip Look at the `code` parameter, there you need to pass the iso code of the language. Example: * `hi` Hindi (language) * `de-AT`: German (language) as used in Austria (region) :: ### Extend locale :badge{label="Soon" class="align-text-top"} You can customize an existing locale by overriding its `messages` or `code` using the `extendLocale` composable: ::module-only #ui :::div ```vue [app.vue] ``` ::: #ui-pro :::div ```vue [app.vue] ``` ::: :: ### Dynamic locale To dynamically switch between languages, you can use the [Nuxt I18n](https://i18n.nuxtjs.org/) module. ::steps{level="4"} #### Install the Nuxt I18n package ::code-group{sync="pm"} ```bash [pnpm] pnpm add @nuxtjs/i18n ``` ```bash [yarn] yarn add @nuxtjs/i18n ``` ```bash [npm] npm install @nuxtjs/i18n ``` ```bash [bun] bun add @nuxtjs/i18n ``` :: #### Add the Nuxt I18n module in your `nuxt.config.ts`{lang="ts-type"} ```ts [nuxt.config.ts] export default defineNuxtConfig({ modules: [ '@nuxt/ui', '@nuxtjs/i18n' ], css: ['~/assets/css/main.css'], i18n: { locales: [{ code: 'de', name: 'Deutsch' }, { code: 'en', name: 'English' }, { code: 'fr', name: 'Français' }] } }) ``` #### Set the `locale` prop using `useI18n` ::module-only #ui :::div ```vue [app.vue] ``` ::: #ui-pro :::div ```vue [app.vue] ``` ::: :: :: ### Dynamic direction Each locale has a `dir` property which will be used by the `App` component to set the directionality of all components. In a multilingual application, you might want to set the `lang` and `dir` attributes on the `` element dynamically based on the user's locale, which you can do with the [useHead](https://nuxt.com/docs/api/composables/use-head) composable: ::module-only #ui :::div ```vue [app.vue] ``` ::: #ui-pro :::div ```vue [app.vue] ``` ::: :: ## Supported languages :supported-languages