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
{{ message }}
This repository was archived by the owner on Apr 22, 2024. It is now read-only.
[](https://devtoken.rocks/package/vue-cli-plugin-i18n)
@@ -21,13 +22,22 @@ If yon don't have a project created with Vue CLI:
21
22
vue create my-vue-app
22
23
```
23
24
25
+
### For Vue 2.x
24
26
Install the plugin into your project:
25
27
26
28
```sh
27
29
cd my-vue-app
28
30
vue add i18n
29
31
```
30
32
33
+
### For Vue 3
34
+
35
+
Install the plugin into your project:
36
+
37
+
```sh
38
+
cd my-vue-app
39
+
vue add i18n@next
40
+
```
31
41
32
42
## :hammer: Injected Commands
33
43
-**`vue-cli-service i18n:report`** (experimental)
@@ -95,19 +105,22 @@ module.exports = {
95
105
96
106
-**Type:**`boolean`
97
107
-**Default in prompt:**`false`
108
+
-**Support project Vue version:** Vue 2 only
98
109
99
110
Wheather enable locale messages in Single file components. Default `No` in propmpt, for Vue 2 and Vue I18n v8.x only.
100
111
101
112
### `enableLegacy`
102
113
103
114
-**Type:**`boolean`
104
115
-**Default in prompt:**`false`
116
+
-**Support project Vue version:** Vue 3 only
105
117
106
118
Wheather use legacy mode API in Vue I18n. Default `No` in propmpt, for Vue 3 and Vue I18n v9 or later.
107
119
108
120
### `runtimeOnly`
109
121
-**Type:**`boolean`
110
122
-**Default(No Prompt):**`false`
123
+
-**Support project Vue version:** Vue 3 only
111
124
112
125
Whether or not to use Vue I18n **runtime-only**, set in the `vue-i18n` field of webpack `resolve.alias` option. default Vue I18n (vue-i18n) package.json `module` field will be used.
113
126
If `true` is specified, Vue I18n (vue-i18n) will use `node_modules/vue-i18n/dist/vue-i18n.runtime.esm-bundler.js`.
@@ -118,6 +131,7 @@ module.exports = {
118
131
119
132
-**Type:**`boolean`
120
133
-**Default(No Prompt):** if `enableLegacy` set `false`, `true` else then `false`
134
+
-**Support project Vue version:** Vue 3 only
121
135
122
136
Whether to make vue-i18n's API only composition API. **By default the legacy API is tree-shaken.**
123
137
@@ -127,6 +141,7 @@ module.exports = {
127
141
128
142
-**Type:**`boolean`
129
143
-**Default(No Prompt):**`true`
144
+
-**Support project Vue version:** Vue 3 only
130
145
131
146
Whether to install the full set of APIs, components, etc. provided by Vue I18n. By default, all of them will be installed.
0 commit comments