atg-vue-common-assign
v1.0.1
Published
Version: 1.0.1
Downloads
4
Readme
Update
Version: 1.0.1
Publish components
Install
npm install atg-vue-common-assign
Quick Start
import Vue from 'vue'
import commonAssign from 'atg-vue-common-assign'
import i18nPackage from 'atg-vue-common-assign/dist/lang.js'
const messages = {
en: {
...i18nPackage.messages.en
},
'zh-CN': {
...i18nPackage.messages['zh-CN']
},
'zh-HK': {
...i18nPackage.messages['zh-HK']
}
// Create VueI18n instance with options
const i18n = new VueI18n({
locale: 'zh', // set locale
messages, // set locale messages
})
Vue.use(commonAssign, {
i18n: (key, value) => i18n.t(key, value)
})