Internationalization plugin for Vue.js
$ npm install vue-i18n
Internationalization plugin for Vue.js
The current codebase has most of the existing features on Vue I18n v8.x and is usable.
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.
If you use stable Vue I18n version, see this repository
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: ReadyfallbackLocale 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-i18nnpm install --save vue-i18n@next
yarn add vue-i18n@next
args typingLocaleMessages / LocaleMessage / LocaleMessageDictiory<i18n><i18n-n>v-t© 2010 - cnpmjs.org x YWFE | Home | YWFE