Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Commit 8035dfb

Browse files
authored
update docs (#174)
1 parent c7eddb4 commit 8035dfb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# :globe_with_meridians: vue-cli-plugin-i18n
22

3+
[![npm](https://img.shields.io/npm/v/vue-cli-plugin-i18n/next.svg)](https://www.npmjs.com/package/vue-cli-plugin-i18n)
34
[![npm](https://img.shields.io/npm/v/vue-cli-plugin-i18n.svg)](https://www.npmjs.com/package/vue-cli-plugin-i18n)
45
![Test](https://github.com/intlify/vue-cli-plugin-i18n/workflows/Test/badge.svg)
56
[![vue-cli-plugin-i18n Dev Token](https://badge.devtoken.rocks/vue-cli-plugin-i18n)](https://devtoken.rocks/package/vue-cli-plugin-i18n)
@@ -21,13 +22,22 @@ If yon don't have a project created with Vue CLI:
2122
vue create my-vue-app
2223
```
2324

25+
### For Vue 2.x
2426
Install the plugin into your project:
2527

2628
```sh
2729
cd my-vue-app
2830
vue add i18n
2931
```
3032

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+
```
3141

3242
## :hammer: Injected Commands
3343
- **`vue-cli-service i18n:report`** (experimental)
@@ -95,19 +105,22 @@ module.exports = {
95105

96106
- **Type:** `boolean`
97107
- **Default in prompt:** `false`
108+
- **Support project Vue version:** Vue 2 only
98109

99110
Wheather enable locale messages in Single file components. Default `No` in propmpt, for Vue 2 and Vue I18n v8.x only.
100111

101112
### `enableLegacy`
102113

103114
- **Type:** `boolean`
104115
- **Default in prompt:** `false`
116+
- **Support project Vue version:** Vue 3 only
105117

106118
Wheather use legacy mode API in Vue I18n. Default `No` in propmpt, for Vue 3 and Vue I18n v9 or later.
107119

108120
### `runtimeOnly`
109121
- **Type:** `boolean`
110122
- **Default(No Prompt):** `false`
123+
- **Support project Vue version:** Vue 3 only
111124

112125
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.
113126
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 = {
118131

119132
- **Type:** `boolean`
120133
- **Default(No Prompt):** if `enableLegacy` set `false`, `true` else then `false`
134+
- **Support project Vue version:** Vue 3 only
121135

122136
Whether to make vue-i18n's API only composition API. **By default the legacy API is tree-shaken.**
123137

@@ -127,6 +141,7 @@ module.exports = {
127141

128142
- **Type:** `boolean`
129143
- **Default(No Prompt):** `true`
144+
- **Support project Vue version:** Vue 3 only
130145

131146
Whether to install the full set of APIs, components, etc. provided by Vue I18n. By default, all of them will be installed.
132147

0 commit comments

Comments
 (0)