Skip to content

Commit

Permalink
- removed repeated sentence (#2008)
Browse files Browse the repository at this point in the history
- corrected spelling
  • Loading branch information
Sammuel09 authored Nov 7, 2024
1 parent 1674c94 commit 1878ac2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/guide/advanced/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ const { t } = useI18n({ useScope: 'global' })
// Something to do here ...
```

The above code sets the `useI18n` option to `useScope: 'global'`, which allows `useI18n` to return a Composer instance that can be accessed by the i18n instance `global` property. This allows `useI18n` to return the Composer instance that can be accessed by i18n instance`global` property, which is a global scope. The Composer instance is a global scope.
The above code sets the `useI18n` option to `useScope: 'global'`, which allows `useI18n` to return a Composer instance that can be accessed by the i18n instance `global` property. The Composer instance is a global scope.

Then you can compose using the functions and properties exposed from the Composer instance.

Expand Down Expand Up @@ -413,7 +413,7 @@ In this example, the definition of resources is separated from i18n custom block

### Shared locale messages for components

In Leacy API mode, shared locale messages are used in components with the `sharedMessages` option.
In Legacy API mode, shared locale messages are used in components with the `sharedMessages` option.

In composition API mode, use `mergeLocaleMessage` exported by `useI18n`.

Expand Down Expand Up @@ -484,7 +484,7 @@ And you can also use the setup context in the template, which can be changed as
</select>
```

When you change the locale of the global scope, components that depend on the global scope, such as `t` translation API can work reactive and switch the display messages to those of the target locale.
When you change the locale of the global scope, components that depend on the global scope, such as `t` translation API can work reactively and switch the display messages to those of the target locale.

If you are using the [implicit way](composition#implicit-with-injected-properties-and-functions), you can also change it in template with `$i18n.locale`, as follows:

Expand Down

0 comments on commit 1878ac2

Please sign in to comment.