How to use the vue-i18n.install function in vue-i18n

To help you get started, we’ve selected a few vue-i18n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / vue-i18n / vue-i18n-tests.ts View on Github external
/// 

const assert = console.assert;
const random = () => Math.trunc(Math.exp(Math.log(Date.now()) * Math.random()));

import Vue, { ComponentOptions } from 'vue';
import * as VueI18n from 'vue-i18n';

/**
 * VueI18n.install
 */
Vue.use(VueI18n);
VueI18n.install(Vue);

/**
 * VueI18n.version
 */
assert(typeof VueI18n.version === 'string');

/**
 * VueI18n Instance
 */
const locale = random().toString();
const key = `_${random()}`;
const value = `${random()}|${random()}|${random()}`;
const i18n = new VueI18n({
  locale,
  fallbackLocale: locale,
  messages: {

vue-i18n

Internationalization plugin for Vue.js

MIT
Latest version published 24 days ago

Package Health Score

95 / 100
Full package analysis