You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The introduction of `setup` and Vue's [Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html) open up new possibilities. But to be able to get the full potential out of Vue I18n, we will need to use a few new functions to replace access to `this`.
3
+
The introduction of `setup` and Vue’s [Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html) open up new possibilities. But to be able to get the full potential out of Vue I18n, we will need to use a few new functions to replace access to `this`.
Copy file name to clipboardExpand all lines: docs/essentials/started.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ The following sections will be explained using the Legacy API.
88
88
89
89
## Have you already used Vue I18n ?
90
90
91
-
If you've used Vue I18n before, you'll want to use the API offered for Compostion API to support i18n, but some new features are supported in Vue I18n v9 and later.
91
+
If you`ve used Vue I18n before, you’ll want to use the API offered for Compostion API to support i18n, but some new features are supported in Vue I18n v9 and later.
92
92
93
93
So recommended that you read through the basics at least once.
Copy file name to clipboardExpand all lines: src/i18n.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -657,12 +657,12 @@ function setupLifeCycle<Messages, DateTimeFormats, NumberFormats>(
657
657
}
658
658
659
659
/**
660
-
* Exported composer interface
660
+
* Exported global composer interface
661
661
*
662
662
* @remarks
663
663
* This interface is the {@link I18n.global | global composer } that is provided interface that is injected into each component with `app.config.globalProperties`.
* Global composer instance, or a instance that are compatible with [email protected]VueI18n interface
33
+
* Exported Global Composer instance, or global VueI18n instance.
34
34
*
35
35
* @remarks
36
-
* You can get the {@link I18n.global | global composer} created during the execution of {@link createI18n}.
37
-
* This instance is global property injected into for each components by `app.config.globalProperties`.
38
-
*
39
-
* If you have specified `legacy: true` in options at `createI18n`, that is in legacy mode, {@link VueI18n} instance is set to for each the components.
40
-
* Otherwise, you will be able get root VueI18n instance.
36
+
* You can get the {@link ExportedGlobalComposer | exported composer instance} which are exported from global {@link Composer | composer instance} created with {@link createI18n}, or global {@link VueI18n | VueI18n instance}.
37
+
* You can get the exported composer instance in {@link I18nMode | compostion mode}, or the Vuei18n instance in {@link I18nMode | legacy mode}, which is the instance you can refer to with this property.
38
+
* The locales, locale messages, and other resources managed by the instance referenced by this property are valid as global scope.
39
+
* If the `i18n` component option is not specified, it's the same as the VueI18n instance that can be referenced by the {@link I18n.global | global} property of the i18n instance.
41
40
*/
42
-
$i18n: VueI18n|ExportedComposer
41
+
$i18n: VueI18n|ExportedGlobalComposer
43
42
/**
44
-
* translation method
43
+
* Translation function
45
44
*
46
45
* @remarks
47
-
* In composition mode, In the case of composition mode, the method (property) is injected by `app.config.globalProperties`.
48
-
* the input / output is the same as for `Composer`, and it's **global**. About that details, see {@link Composer.t | `Composer#t` }.
46
+
* In {@link I18nMode | compostion mode}, the `$t` is injected by `app.config.globalProperties`.
47
+
* the input / output is the same as for Composer, and it work on **global scope**. About that details, see {@link Composer.t | `Composer#t` }.
49
48
*
50
-
* In legacy mode, the input / output is the same as for `VueI18n` of [email protected]. About that details, see {@link VueI18n.t | `VueI18n#t`}.
49
+
* In {@link I18nMode | legacy mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n.t | `VueI18n#t`}.
* The input / output is the same as for `VueI18n` of [email protected]. About that details, see {@link VueI18n.te | `VueI18n.#te` }.
94
+
* The input / output is the same as for VueI18n instance. About that details, see {@link VueI18n.te | `VueI18n.#te` }.
96
95
*
97
96
* This property is supported for legacy mode only
98
97
*/
99
98
$te(key: Path,locale?: Locale): boolean
100
99
/**
101
-
* datetime method
100
+
* Datetime localization function
102
101
*
103
102
* @remarks
104
-
* In composition mode, In the case of composition mode, the method (property) is injected by `app.config.globalProperties`.
105
-
* the input / output is the same as for `Composer`, and it's **global**. About that details, see {@link Composer.d | `Composer#d` }.
103
+
* In {@link I18nMode | compostion mode}, the `$d` is injected by `app.config.globalProperties`.
104
+
* the input / output is the same as for Composer instance, and it work on **global scope**. About that details, see {@link Composer.d | `Composer#d` }.
106
105
*
107
-
* In legacy mode, the input / output is the same as for `VueI18n` of [email protected]. About that details, see {@link VueI18n.d | `VueI18n#d` }.
106
+
* In {@link I18nMode | legacy mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n.d | `VueI18n#d` }.
* In composition mode, In the case of composition mode, the method (property) is injected by `app.config.globalProperties`.
125
-
* the input / output is the same as for `Composer`, and it's **global**. About that details, see {@link Composer.n | `Composer.n` }.
123
+
* In {@link I18nMode | compostion mode}, the `$n` is injected by `app.config.globalProperties`.
124
+
* the input / output is the same as for Composer instance, and it work on **global scope**. About that details, see {@link Composer.n | `Composer.n` }.
126
125
*
127
-
* In legacy mode, the input / output is the same as for `VueI18n` of [email protected]. About that details, see {@link VueI18n.n | `VueI18n.n` }.
126
+
* In {@link I18nMode | legacy mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n.n | `VueI18n.n` }.
* In composition mode, In the case of composition mode, the method (property) is injected by `app.config.globalProperties`.
142
-
* the input / output is the same as for `Composer`, and it's **global**. About that details, see {@link Composer.tm | `Composer.tm` }.
140
+
* In {@link I18nMode | compostion mode}, the `$tm` is injected by `app.config.globalProperties`.
141
+
* the input / output is the same as for Composer instance, and it work on **global scope**. About that details, see {@link Composer.tm | `Composer.tm` }.
143
142
*
144
-
* In legacy mode, the input / output is the same as for `VueI18n` of [email protected]. About that details, see {@link VueI18n.tm | `VueI18n#tm` }.
143
+
* In {@link I18nMode | legacy mode}, the input / output is the same as for VueI18n instance. About that details, see {@link VueI18n.tm | `VueI18n#tm` }.
0 commit comments