Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 1.22 KB

1.setup.md

File metadata and controls

57 lines (45 loc) · 1.22 KB
title
Setup

::alert{type="warning"} ❗IMPORTANT

  • From this section, this documentation is for @nuxtjs/i18n v8 beta. if you would like to use v7.x, see the here

  • @nuxtjs/i18n next is still v8 beta, the API might subject to breaking changes. We will make every effort to have the same I/F as v7.x, but Nuxt 3 is a major release, it might not be the same I/F. ::

::alert{type="info"} Check the Nuxt.js documentation for more information about installing and using modules in Nuxt.js. ::

Add @nuxtjs/i18n dependency to your project:

::code-group

npm install @nuxtjs/i18n@next --save
yarn add @nuxtjs/i18n@next
pnpm add @nuxtjs/i18n@next --save

::

Then, add @nuxtjs/i18n to the modules section in your nuxt.config.js. You can use either of the following ways to specify the module options:

export default defineNuxtConfig({
  modules: [
    '@nuxtjs/i18n',
  ],
  i18n: {
    /* module options */
  }
})

or

export default defineNuxtConfig({
  modules: [
    [
      '@nuxtjs/i18n',
      { /* module options */ }
    ]
  ]
})