diff --git a/docs/content/1.getting-started/2.basic-usage.md b/docs/content/1.getting-started/2.basic-usage.md index 016c06d2d..88d326f79 100644 --- a/docs/content/1.getting-started/2.basic-usage.md +++ b/docs/content/1.getting-started/2.basic-usage.md @@ -40,6 +40,20 @@ The `i18n.config` file exports the same options as `createI18n` function of Vue For more details about configuration, see the [Vue I18n documentation](https://vue-i18n.intlify.dev/api/general.html#createi18n). +::alert{type="info"} + +The following documentation, explain how to use the nuxt i18n module with using Vue I18n Composition API. + +For more information on how to use Vue I18n Composition API, please see the docs [here](https://vue-i18n.intlify.dev/guide/advanced/composition.html). + +:: + +::alert{type="warning"} + +You can also use Vue I18n's Legacy API in nuxt i18n module. you need to configure [nuxt.config](https://v8.i18n.nuxtjs.org/options/misc#bundle) and i18n.config (`legacy: true`) + +:: + Now, put (or edit) the following the page component in `pages` directory of you project: ```vue {}[pages/index.vue] diff --git a/docs/content/3.options/6.misc.md b/docs/content/3.options/6.misc.md index 36963620e..d7df058d9 100644 --- a/docs/content/3.options/6.misc.md +++ b/docs/content/3.options/6.misc.md @@ -33,6 +33,14 @@ Supported properties: - `compositionOnly` (default: `true`) - Whether to make vue-i18n API only composition API. By default the legacy API is tree-shaken. For more details, See [here](https://vue-i18n.intlify.dev/guide/advanced/optimization.html#reduce-bundle-size-with-feature-build-flags) + ::alert{type="warning"} + + If you would like to use Vue I18n's Legacy API, you must set `compositionOnly: false`. **Note that setting this value will disable Vue I18n Composition API**. + + Note that the Legacy API can also be used in hybrid by setting the Vue I18n option to `allowComposition: true` in i18n.config, but this is limited. See [here](https://vue-i18n.intlify.dev/guide/migration/vue3.html) for details. + + :: + ## `compilation`