@intlify/core-base
The intlify core base module
@intlify/core-base
The intlify core base module
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v11.0.0...v11.0.1
This changelog is generated by GitHub Releases
The Legacy API mode was the API mode compatible with v8 for Vue 2. When v9 was released, the Legacy API was provided to smooth the migration from v8 to v9.
Legacy API mode will be deprecated in v11, as previous vue-i18n releases have already provided the following to support migration to Composition API mode
For compatibility, Legacy API mode still works in v11, but will be removed entirely in v12, so Legacy API mode will not work after that version.
v-t
The advantage of v-t
was that it could optimize performance using the vue compiler transform and the pre-translation of vue-i18n-extension
.
This feature was supported from Vue 2. About details see the blog article
In Vue 3, due to the Composition API, the pre-translation of vue-i18n-extension
is now limited only for global scope.
In addition, Vue 3 Virtual DOM optimization has been introduced, and the optimization provided by vue-i18n-extension
is no longer very effective. We need to require settings for SSR, the benefits of using v-t
have disappeared. And DX of templates using v-t
is not good. Custom directives do not work with key completion in editors (e.g. vscode).
For compatibility, v-t
mode still works in v11, but will be removed entirely in v12, so v-t
will not work after that version.
tc
and $tc
for Legacy API modeThese APIs had already deprecated in warning about being dropped in v11. docs says
Vue I18n v8 is no longer supported after 2025. Vue I18n v9 and Vue I18n v10 is in maintenance mode after 2025 July.
With the release of Vue I18n v11, that version will become mainstream.
The maintenance detail status of Vue I18n v9 and Vue I18n v10 is as follows:
You can check the maintenance status on the docs
$tc
and tc
by @kazupon in https://github.com/intlify/vue-i18n/pull/2017v-t
custom directive by @kazupon in https://github.com/intlify/vue-i18n/pull/2045tm
function should accept DefineLocaleMessage
key type by @BobbieGoede in https://github.com/intlify/vue-i18n/pull/2014Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.4...v11.0.0
This changelog is generated by GitHub Releases
v-t
custom directive by @kazupon in https://github.com/intlify/vue-i18n/pull/2045Full Changelog: https://github.com/intlify/vue-i18n/compare/v11.0.0-beta.2...v11.0.0-rc.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v11.0.0-beta.1...v11.0.0-beta.2
This changelog is generated by GitHub Releases
$tc
and tc
by @kazupon in https://github.com/intlify/vue-i18n/pull/2017Full Changelog: https://github.com/intlify/vue-i18n/compare/v11.0.0-beta.0...v11.0.0-beta.1
This changelog is generated by GitHub Releases
tm
function should accept DefineLocaleMessage
key type by @BobbieGoede in https://github.com/intlify/vue-i18n/pull/2014Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.4...v11.0.0-beta.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.3...v10.0.4
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.2...v10.0.3
This changelog is generated by GitHub Releases
deepCopy
mutates src
arguments by @BobbieGoede in https://github.com/intlify/vue-i18n/pull/1947Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.1...v10.0.2
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0...v10.0.1
We are excited to announce the release of Vue I18n v10. We had many contributors.
Thanks for your contributing ❤️
petite-vue-i18n
General Availabilitypetite-vue-i18n
is an alternative distribution of Vue I18n, providing only minimal features.
If you don't need the full functionality of vue-i18n and are just looking for basic translation features with a smaller footprint, this will suit your use case.
For more details, please see the docs.
JIT compilation was introduced in v9.3, but it was not enabled by default.
However, it had the following issues:
Starting from v10, JIT compilation is enabled by default.
We provide an interface to extend the Locale type in TypeScript, similar to ComponentCustomProperties
in Vue.
This feature is useful when using vue-i18n as part of a framework.
For more details, see the PR for the Nuxt I18n use case.
$t
and t
Overload Signatures for Legacy API ModeIn Vue I18n v9, $t
and t
had different overload signatures in Composition API mode compared to Legacy API mode.
When migrating from Legacy API mode to Composition API mode, these differences sometimes caused confusion.
Starting from v10, Legacy API mode will use the same $t
and t
overload signatures as Composition API mode.
For details on the signature pattern, see the migration guide.
tc
and $tc
for Legacy API ModeThe t
and $t
functions already support pluralization, so tc
and $tc
can be replaced.
In v10, tc
and $tc
still exist to aid in migration, but they will be fully removed in v11.
If you use them, Vue I18n will display a console warning in your application.
For migration instructions, see the docs.
Some features were marked as deprecated in v9 with warnings.
These deprecated features will be completely removed in v10.
For more details on the deprecated features, see the docs.
$t
overloaded signature for Legacy API mode by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1832<i18n>
v8.x compatibility by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1844te
behavior v8.x compatibility on v9 by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1845tc
and $tc
for Legacy API mode by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1839formatter
option codes on Legacy API by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1826preserveDirectiveContent
option codes on Legacy API by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1827preserve
modifier codes on v-t
directive by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1828getChoiceIndex
on Legacy API by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1829allowComposition
option by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1817$t
types by @mitjans in https://github.com/intlify/vue-i18n/pull/1883Full Changelog: https://github.com/intlify/vue-i18n/compare/v9.13.1...v10.0.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0-beta.6...v10.0.0-rc.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0-beta.5...v10.0.0-beta.6
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0-beta.4...v10.0.0-beta.5
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0-beta.3...v10.0.0-beta.4
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0-beta.2...v10.0.0-beta.3
This changelog is generated by GitHub Releases
$t
types by @mitjans in https://github.com/intlify/vue-i18n/pull/1883Full Changelog: https://github.com/intlify/vue-i18n/compare/v10.0.0-beta.1...v10.0.0-beta.2
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v10.0.0-alpha.5...v10.0.0-beta.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v10.0.0-alpha.4...v10.0.0-alpha.5
This changelog is generated by GitHub Releases
$t
overloaded signature for Legacy API mode by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1832<i18n>
v8.x compatibility by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1844te
behavior v8.x compatibility on v9 by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1845tc
and $tc
for Legacy API mode by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1839Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v10.0.0-alpha.3...v10.0.0-alpha.4
This changelog is generated by GitHub Releases
formatter
option codes on Legacy API by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1826preserveDirectiveContent
option codes on Legacy API by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1827preserve
modifier codes on v-t
directive by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1828getChoiceIndex
on Legacy API by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1829Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v10.0.0-alpha.2...v10.0.0-alpha.3
This changelog is generated by GitHub Releases
allowComposition
option by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1817Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v10.0.0-alpha.1...v10.0.0-alpha.2
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.13.1...v10.0.0-alpha.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.13.0...v9.13.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.12.1...v9.13.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.12.0...v9.12.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.11.1...v9.12.0
This changelog is generated by GitHub Releases
.d.ts
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1794Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.11.0...v9.11.1
This changelog is generated by GitHub Releases
scope
prop by @BobbieGoede in https://github.com/intlify/vue-i18n-next/pull/1786Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.10.2...v9.11.0
This changelog is generated by GitHub Releases
message-compiler
by @BobbieGoede in https://github.com/intlify/vue-i18n-next/pull/1766Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.10.1...v9.10.2
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.10.0...v9.10.1
This changelog is generated by GitHub Releases
te
behavior compatibility before v9.6 by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1751Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.9.1...v9.10.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.9.0...v9.9.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.8.0...v9.9.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.7.1...v9.8.0
This changelog is generated by GitHub Releases
@intlify/core
conditional exports by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1639Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.7.0...v9.7.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.6.5...v9.7.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.6.4...v9.6.5
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.6.3...v9.6.4
This changelog is generated by GitHub Releases
/* #__PURE__*/
comment timing by @newives in https://github.com/intlify/vue-i18n-next/pull/1623Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.6.2...v9.6.3
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.6.1...v9.6.2
This changelog is generated by GitHub Releases
te
logic strictly by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1612te
fallback to root by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1613Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.6.0...v9.6.1
This changelog is generated by GitHub Releases
@intlfy/core-base
(@intlify/core
) by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1594@vite-ignore
magic comment by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1590setLocaleMessage
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1601te
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1602Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.5.0...v9.6.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.4.1...v9.5.0
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.4.0...v9.4.1
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0...v9.4.0
We are excited to announce the release of Vue I18n v9.3, finally !! This release includes some new features, bug fixes, improvements, and document fixes.
We had commited with 37 contributors. Thanks for your contributing ❤️
In the following, we introduce some of the new features:
cjs
/ mjs
)We provide CommonJS and Native ESM dual module packages for Node.js. This supports both require
and import
for loading modules in Node.js.
Supports JIT (Just In Time) style compilation of message formats. This mean, removes the CSP limitation and allows for use in environments such as Service worker, Web worker, and Edge.
It mean also now supports the use-case where locale messages are dynamically retrieved from the backend via the API.
For more information, please see the docs
The performance of JIT-style compilation is close to that of conventional AOT (Ahead Of Time) style compilation, and you can improve the performance to nearly 3x with combination of JIT + AOT.
Below are the compile performance benchmark results for vue-i18n:
> node ./benchmark/index.mjs
compilation:
compile simple message x 396,898 ops/sec ±0.31% (98 runs sampled)
compile complex message x 60,036 ops/sec ±0.34% (99 runs sampled)
simple pattern on 1000 resources (AOT):
resolve time with core x 279,919 ops/sec ±0.19% (99 runs sampled)
resolve time on composition x 93,963 ops/sec ±0.48% (93 runs sampled)
resolve time on composition with compile cache x 230,928 ops/sec ±0.20% (100 runs sampled)
simple pattern on 1000 resources (JIT):
resolve time with core x 277,813 ops/sec ±0.18% (99 runs sampled)
resolve time on composition x 91,959 ops/sec ±0.43% (97 runs sampled)
resolve time on composition with compile cache x 227,117 ops/sec ±0.15% (99 runs sampled)
simple pattern on 1000 resources (JIT + AOT):
resolve time with core x 319,061 ops/sec ±0.18% (100 runs sampled)
resolve time on composition x 204,529 ops/sec ±0.22% (95 runs sampled)
resolve time on composition with compile cache x 204,652 ops/sec ±0.30% (100 runs sampled)
complex pattern on 1000 resources (AOT):
resolve time with core x 240,427 ops/sec ±0.37% (100 runs sampled)
resolve time on composition x 33,959 ops/sec ±0.45% (94 runs sampled)
resolve time on composition with compile cache x 200,980 ops/sec ±0.15% (99 runs sampled)
complex pattern on 1000 resources (JIT):
resolve time with core x 225,739 ops/sec ±0.25% (99 runs sampled)
resolve time on composition x 36,379 ops/sec ±0.49% (97 runs sampled)
resolve time on composition with compile cache x 191,653 ops/sec ±0.24% (100 runs sampled)
complex pattern on 1000 resources (JIT + AOT):
resolve time with core x 278,542 ops/sec ±0.20% (98 runs sampled)
resolve time on composition x 92,781 ops/sec ±0.31% (98 runs sampled)
resolve time on composition with compile cache x 92,865 ops/sec ±0.33% (98 runs sampled)
You can clone Vue I18n and run the benchmark with pnpm build:type && pnpm benchmark
to check.
Starting with v9.3, Vue I18n will give message format customization as an experimental feature. This will allow for extending to the message format:
import { createI18n } from 'vue-i18n'
import { messageCompiler } from './compilation'
const i18n = createI18n({
legacy: false,
locale: 'en',
messageCompiler,
messages: {
en: {
hello: 'hello world!',
greeting: 'hi, {name}!',
photo: `You have {numPhotos, plural,
=0 {no photos.}
=1 {one photo.}
other {# photos.}
}`
}
}
})
About details, please see the docs
messageCompiler
option by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1497Export v-t
type definitions and API $te
to support Vue I18n extending for third vendors and your Vue applications.
v-t
directive type by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1511$te
as global on composition mode by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1222allowComposition
optionThe allowComposition
option will be removed in Vue I18n v10. We have accordingly output a warning if you are using it.
If you are using Vue I18n Legacy API to migrate to the Composition API, please make sure you have done so with the Vue I18n v9 version.
allowComposition
option by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1496The following plugin or loader for bundler is deprecated because it can be replaced by the unplugin-vue-i18n
.
These will only be taken as hot fixes in the future, and no additional functionality will be added.
globalThis
with bundler by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1413TranslateVNodeSymbol
by @DamianGlowala in https://github.com/intlify/vue-i18n-next/pull/1236optionalDependencies
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1184isMessageAST
more strictly by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1509rt
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1455<i18n-t>
, <i18n-n>
and <i18n-d>
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1416Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.2.2...v9.3.0
This changelog is generated by GitHub Releases
messageCompiler
option by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1497v-t
directive type by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1511isMessageAST
more strictly by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1509Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.26...v9.3.0-beta.27
This changelog is generated by GitHub Releases
allowComposition
option by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1496Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.25...v9.3.0-beta.26
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.24...v9.3.0-beta.25
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.23...v9.3.0-beta.24
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.22...v9.3.0-beta.23
This changelog is generated by GitHub Releases
rt
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1455Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.21...v9.3.0-beta.22
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.20...v9.3.0-beta.21
This changelog is generated by GitHub Releases
This changelog is generated by GitHub Releases
<i18n-t>
, <i18n-n>
and <i18n-d>
by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1416Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.18...v9.3.0-beta.19
This changelog is generated by GitHub Releases
globalThis
with bundler by @kazupon in https://github.com/intlify/vue-i18n-next/pull/1413Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.17...v9.3.0-beta.18
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.16...v9.3.0-beta.17
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.15...v9.3.0-beta.16
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.14...v9.3.0-beta.15
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.13...v9.3.0-beta.14
This changelog is generated by GitHub Releases
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.12...v9.3.0-beta.13
This changelog is generated by GitHub Releases
This is new release flow test release
Full Changelog: https://github.com/intlify/vue-i18n-next/compare/v9.3.0-beta.11...v9.3.0-beta.12
core-base
, shared
, vue-i18n-core
vue-i18n-core
TranslateVNodeSymbol
(@DamianGlowala)petite-vue-i18n
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
vue-i18n-core
vue-i18n-core
core-base
, core
, devtools-if
, message-compiler
, petite-vue-i18n
, shared
, vue-devtools
, vue-i18n-bridge
, vue-i18n
core-base
, core
, devtools-if
, message-compiler
, petite-vue-i18n
, shared
, vue-devtools
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
core-base
, core
, devtools-if
, message-compiler
, petite-vue-i18n
, shared
, size-check-core
, size-check-petite-vue-i18n
, size-check-vue-i18n
, vue-devtools
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
This release is for native ESM support preparation.
petite-vue-i18n
We are excited to announce the release of Vue I18n v9.2 !! This release includes many new features, bug fixes, improvements, and document fixes.
We had commited with 35 contributors. Thanks for your contributing ❤️
In the following, we introduce some of the new features:
From Vue I18n v9.2, we have improved TypeScript support. This allows type checking of resources specified in the messages
option of createI18n
and complementing with APIs such as t
.
The following images is the resoureces type-checked:
The following gif image is the API completion working:
For more information on how to setup the system, please read the docs
WebComponents has been supported since Vue 3.2. You can support your Vue Component with Vue I18n as well.
About details, See more the docs
We have released petite-vue-i18n
, a small size subset version of Vue I18n, as an experimental feature.
Only minimal functionality is provided in this module. you can reduce your Vue application bundle size with using this module. If you do not need to use all the features of Vue I18n, this module would be a good option.
About details, See more README
We have released a module called vue-i18n-bridge
to support Vue 2 applications with Vue I18n v8.x migrate to Vue 3.
vue-i18n-bridge
is a module that is mostly compatible with the Vue I18n v9 API. It's an add-on to existing Vue I18n v8.26.1 or later + Vue 2 applications to take advantage of the Composition API provided in Vue I18n v9. This module would be able to support the progressive migration to Vue 3.
About details, See more the docs
globalInjection
option As defaultFrom Vue I18n v9.2, the globalInjection
option defaults to true
. If you localize by global scope using $t
in your template, you no longer need to set this option.
useI18n
in Legacy API modeWe have supported for useI18n
in Legacy API mode. This feature would be useful if you want to migrate from the options API style to the Composition API style in your Vue 3 application.
About details, See more the docs
vue-i18n-bridge
module for migration to Vue 3 of course supports Vue 2.7.
Instead of going from Vue 2.6 to Vue 3 directly, you can migrate your Vue applications using Vue I18n with a strategy of Vue 2.6, Vue 2.7, and then Vue 3 progressively.
v-t
We have supported SSR for v-t
. If your Vue application uses v-t
, you can support SSR without having to be aware in your Vue application.
globalInjection
option default value (@kazupon)useI18n
for Legacy API mode (@kazupon)useI18n
on Legacy API mode (@kazupon)d.ts
breaking (@kazupon)Stdio
for Studio
(@FMGordillo)defaultSFCLang
and globalSFCScope
to sfc (@userquin)message-compiler
, vue-i18n-core
core-base
, vue-i18n-core
vue-i18n-bridge
core-base
, message-compiler
, vue-i18n-core
core-base
, vue-i18n-core
vue-i18n-core
vue-i18n-core
vue-i18n-core
vue-i18n-core
vue-i18n-core
vue-i18n-core
petite-vue-i18n
, vue-i18n
vue-i18n-core
core-base
, vue-i18n-core
petite-vue-i18n
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
vue-i18n-bridge
, vue-i18n-core
core-base
core-base
, core
, message-compiler
, petite-vue-i18n
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
petite-vue-i18n
, vue-i18n-bridge
, vue-i18n
core-base
, core
, devtools-if
, message-compiler
, petite-vue-i18n
, shared
, vue-devtools
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
core-base
, core
, devtools-if
, message-compiler
, petite-vue-i18n
, shared
, vue-devtools
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
petite-vue-i18n
, size-check-core
, size-check-petite-vue-i18n
, size-check-vue-i18n
, vue-i18n-bridge
, vue-i18n-core
, vue-i18n
vue-i18n-core
message-compiler
, vue-i18n-core
Stdio
for Studio
(@FMGordillo)vue-i18n-bridge
, vue-i18n-core
, vue-i18n
vue-i18n-core
core-base
, vue-i18n-bridge
, vue-i18n-core
size-check-petite-vue-i18n
, size-check-vue-i18n
, vue-i18n-core
core-base
, core
, devtools-if
, message-compiler
, message-resolver
, petite-vue-i18n
, runtime
, size-check-core
, size-check-petite-vue-i18n
, size-check-vue-i18n
, vue-devtools
, vue-i18n-core
, vue-i18n
core-base
, vue-i18n
core-base
, message-resolver
, vue-i18n
core-base
, core
, devtools-if
, message-compiler
, message-resolver
, runtime
, shared
, vue-devtools
, vue-i18n
vue-i18n
core-base
, vue-i18n
size-check-vue-i18n
, vue-i18n
vue-i18n
vue-i18n
vue-i18n
core-base
, vue-i18n
vue-i18n
core-base
core-base
vue-i18n
core-base
vue-i18n
vue-i18n
petite-vue-i18n
, size-check-petite-vue-i18n
, size-check-vue-i18n
core-base
, core
, devtools-if
, message-compiler
, message-resolver
, petite-vue-i18n
, runtime
, size-check-core
, size-check-petite-vue-i18n
, size-check-vue-i18n
, vue-devtools
, vue-i18n-core
, vue-i18n
core-base
, vue-i18n
size-check-vue-i18n
, vue-i18n
vue-i18n
core-base
, core
, devtools-if
, message-compiler
, message-resolver
, runtime
, shared
, vue-devtools
, vue-i18n
defaultSFCLang
and globalSFCScope
to sfc (@userquin)vue-i18n
core-base
vue-i18n
core-base
vue-i18n
core-base
, vue-i18n
vue-i18n
vue-i18n
vue-i18n
core-base
, devtools-if
, vue-i18n
core-base
, vue-i18n
message-resolver
, shared
, vue-i18n
vue-i18n
vue-i18n
message-compiler
core-base
, vue-i18n
core-base
message-compiler
, shared
, vue-i18n
vue-i18n
core-base
, size-check-vue-i18n
, vue-i18n
To provide experimental features for @intlify/devtools
, feature flags have been separated as follows.
__VUE_I18N_PROD_DEVTOOLS__
: enable/disable vue-devtools support in production, default: false__INTLIFY_PROD_DEVTOOLS__
: enable/disable @intlify/devtools
support in production, default: falsePreviously, __INTLIFY_PROD_DEVTOOLS__
setting flagged the use of both vue-devtools and @intlify/devtools
in production.
In later v9.1, The feature flags for vue-devtools are now enabled/disabled by setting __VUE_I18N_PROD_DEVTOOLS__
.
vue-i18n
See the below link: https://blog.intlify.dev/posts/vue-i18n-9.html
vue-i18n
message-compiler
vue-i18n
mergeLocaleMessage
, and modify some tests (@PeterAlfredLee)core-base
fallbackLocale
is empty string, and add a test (@PeterAlfredLee)message-resolver
, vue-i18n
message-resolver
, vue-i18n
Vue I18n is entering RC :tada:
vue-i18n
message-compiler
message-compiler
core-base
, core
, message-compiler
, runtime
, shared
, vue-i18n
message-compiler
core-base
core-base
, message-compiler
, shared
, vue-i18n
core-base
, core
, message-compiler
, runtime
, vue-i18n
core-base
, core
, message-compiler
, runtime
, size-check-core
, size-check-vue-i18n
, vue-i18n
core
, message-compiler
vue-i18n
core
, message-compiler
, message-resolver
, runtime
, shared
, vue-i18n
core
, runtime
, shared
, size-check-core
, size-check-vue-i18n
, vue-i18n
i18n-t
(In v8.x, it was called i18n
component as Component interpolation feature) (@kazupon)New style API for Vue 3. See the following docs:
See the examples
directory.
The examples are offered that use the following two API styles:
$t
and t
methods is string only. object and array values are no longer returned.$tc
and tc
methods is string only. object and array values are no longer returned.VueI18n
class cannot used with new
. It can only be used via the $i18n
property of Vue instance.new VueI18n
with createI18n
, you can use existing VueI18n
options as they are.examples/legacy
directory.VueI18n.prototype.getChoiceIndex
pluralizationRules
option of createI18n
factory function (like new VueI18n(...)
)pluralRules
option of createI18nComposer
facatory functionVueI18n.version
-> import { VERSION } from 'vue-i18n'
VueI18n.availabilities
-> import { availabilities } from 'vue-i18n'
Status: Ready
fallbackLocale
or fallbackLocales
(related vue-i18n issue)<i18n>
custom block supporting for SFCv-t
directivepreserveDirectiveContent
option (depend on v-t
)<i18n>
component<i18n-n>
componentwarnHtmlInMessage
optionvue-cli-plugin-i18n
@intlify/vue-i18n-loader
@intlify/rollup-plugin-vue-i18n
@intlify/vue-i18n-extensions
@intlify/eslint-plugin-vue-i18n
npm install --save vue-i18n@next
yarn add vue-i18n@next
Note that you need to guarantee this context equal to component instance in lifecycle methods (e.g. in data
options, const $t = this.$t.bind(this)
).
export default {
data() {
const $t = this.$t.bind(this)
return { msg: $t('msg') }
}
}
see the API docs
:tada: :tada: :tada:
See the docs
te()
that always uses this.locale
, even when locale
supplied (#147) by @aicest (bf15eeb), closes #147:tada: :tada: :tada:
See the docs
fallbackRoot
and sync
option default true
value (0890b44)sync
option (5c46c07)This is the first release of 6.0. In this version, we are some big breaking changes.
:warning: Documentation still needs to be worked on. And also, we might change some APIs and features.
In the examples, please refer to this examples directory.
locale
option, or VueI18n#localefallbackLocale
option, or VueI18n#fallbackLocalemissing
option, or VueI18n#missingformatter
option, or VueI18n#formattermessages
option, or VueI18n#messagesmessages
of i18n
option (e.g { i18n: { messaes: ... } }
)locale
of Vue instance property $i18n
(e.gvm.$i18n.locale = 'en'
)I18nOptions
type of flowtype.I18n
interface definition of flowtype.Vue.use
options (options.locales
, options.lang
). See READMEbower
package managerI think that bower is dead. :no_good:
Vue.config.lang
Vue.t
functionv-t
directive$t
method$t
method$t
methodVue.t
function