Skip to content

Commit

Permalink
docs: updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Aug 16, 2023
1 parent e3c1b30 commit 4c62a36
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/content/1.getting-started/2.basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 8 additions & 0 deletions docs/content/3.options/6.misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down

0 comments on commit 4c62a36

Please sign in to comment.