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
- If you use stable Vue I18n version, see this [repository](https://github.com/kazupon/vue-i18n)
36
37
37
-
Since the library is still unstable **and because we want feedback** on bugs and missing features, **it will probably go through a few breaking changes**.
38
-
39
-
If you use stable Vue I18n version, see this [repository](https://github.com/kazupon/vue-i18n)
40
-
41
-
## :star: New Features
42
-
43
-
### Message Format Syntax
44
-
- Literal Interpolation
45
-
- You can use a single quote `'` and "Mustache" like (`{``}` ) to make the message literal.
46
-
- e.g. `foo{'@'}domain.com`
47
-
- Message Functions
48
-
- As with Vue's render function, vue-i18n-next (and future releases) support the **Message** functions.
49
-
- Using the Message function has the following advantages:
50
-
- Accelerate evaluation of vue-i18n messages (pre-compilation)
51
-
- Support for complex i18n that cannot be handled by message format
52
-
53
-
### Composition API
54
-
55
-
New style API for Vue Composition API. See the following docs:
- For production mode, HTML message detect is not check due to performance.
128
-
-`v-t` directive
129
-
-`preserve` modifier deprecated, keep Element content
130
-
- Legacy API `preserveDirectiveContent` option, and property deprecated
131
-
-`VueI18n.version` -> `import { VERSION } from 'vue-i18n'`
132
-
-`VueI18n.availabilities` -> `import { availabilities } from 'vue-i18n'`
133
-
- See the details [here](https://github.com/intlify/vue-i18n-next/blob/master/docs/api/vue-i18n.md)
134
-
135
-
#### Components
136
-
-`<i18n>` component
137
-
- Rename to `<i18n-t>` component
138
-
- Remove `Boolean` type from `tag` prop
139
-
- if `tag` prop is not specified, return the Fragment
140
-
- Remove the below props:
141
-
-`place` prop
142
-
-`places` prop
143
-
-`path` prop (Rename to `keypath` prop)
144
-
-`<i18n-n>` component
145
-
- Remove `Boolean` type from `tag` prop
146
-
- if `tag` prop is not specified, return the Fragment
147
-
148
-
### :zap: Improvements
149
-
150
-
- See the [vue-i18n issues](https://github.com/kazupon/vue-i18n/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Ready%22) that are labeled with `Status: Ready`
151
-
152
-
153
-
### :hammer: Missing features
154
-
155
-
- Custom formatting
156
-
- Tooling
157
-
-`@intlify/devtools`
158
-
-`vue-cli-plugin-i18n`
159
-
-`@intlify/eslint-plugin-vue-i18n`
160
-
161
-
162
-
## :cd: Installation
163
-
164
-
### npm
165
-
166
-
```bash
167
-
npm install --save vue-i18n@next
168
-
```
169
-
170
-
### yarn
171
-
```bash
172
-
yarn add vue-i18n@next
173
-
```
174
-
175
-
## :package: About dist files
176
-
177
-
### From CDN or without a Bundler
178
-
179
-
-**`vue-i18n.global(.prod).js`**:
180
-
- For direct use via `<script src="...">` in the browser. Exposes the `VueI18n` global.
181
-
- Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and are only meant for direct use via `<script src="...">`.
182
-
- Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `*.prod.js` files for production.
183
-
184
-
-**`vue-i18n.esm-browser(.prod).js`**:
185
-
- For usage via native ES modules imports (in browser via `<script type="module">`.
186
-
- Shares the same runtime compilation, dependency inlining and hard-coded prod/dev behavior with the global build.
187
-
188
-
### With a Bundler
189
-
190
-
-**`vue-i18n.esm-bundler.js`**:
191
-
- For use with bundlers like `webpack`, `rollup` and `parcel`.
192
-
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler)
193
-
- Does not ship minified builds (to be done together with the rest of the code after bundling)
194
-
195
-
#### Bundler Build Feature Flags
196
-
197
-
Starting with 9.0.0-beta.2, `esm-bundler` builds now exposes global feature flags that can be overwritten at compile time:
198
-
199
-
-`__VUE_I18N_FULL_INSTALL__` (enable/disable, in addition to vue-i18n APIs, components and directives all fully support installation: `true`)
-`__INTLIFY_PROD_DEVTOOLS__` (enable/disable intlify-devtools and vue-devtools support in production, default: `false`)
202
-
203
-
The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree-shaking in the final bundle. To configure these flags:
204
-
205
-
- webpack: use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/)
206
-
- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
207
-
- Vite: configured by default, but can be overwritten using the [`define` option](https://github.com/vitejs/vite/blob/a4133c073e640b17276b2de6e91a6857bdf382e1/src/node/config.ts#L72-L76)
208
-
209
-
Note: the replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions.
-[ ] support i18n resources packing (pre-compilation) CLI
59
+
-[ ] vue-cli-plugin-i18n
60
+
-[ ] support i18n custom blocks sourcemaps
342
61
343
-
</details>
62
+
## :muscle: Contribution
344
63
64
+
Please make sure to read the [Contributing Guide](https://github.com/intlify/vue-i18n-next/blob/master/.github/CONTRIBUTING.md) before making a pull request.
0 commit comments