Setup
You are reading the
Checkout the
v8 RC
documentation compatible with Nuxt 3. Checkout the
v7
documentation for Nuxt 2 here.Check the Nuxt documentation for more information about installing and using modules in Nuxt.
Nuxt i18n module is using Vue I18n v9. please see Vue i18n docs for about how to usage.
Add @nuxtjs/i18n
dependency to your project:
NPM
npm install @nuxtjs/i18n@next --save-dev
Then, add @nuxtjs/i18n
to the modules
section in your nuxt.config
. You can use either of the following ways to specify the module options:
nuxt.config.ts
export default defineNuxtConfig({
modules: [
'@nuxtjs/i18n',
],
i18n: {
/* module options */
}
})
or
nuxt.config.ts
export default defineNuxtConfig({
modules: [
[
'@nuxtjs/i18n',
{ /* module options */ }
]
]
})