mirror of
https://gitee.com/zongzhige/shopxo-uniapp.git
synced 2026-07-05 13:22:25 +08:00
19 lines
367 B
JavaScript
19 lines
367 B
JavaScript
import VueI18n from 'vue-i18n';
|
|
import Vue from 'vue';
|
|
|
|
import zhHans from './zh.json';
|
|
import en from './en.json';
|
|
|
|
let i18nConfig = {
|
|
locale: uni.getLocale(),
|
|
silentTranslationWarn: true,
|
|
messages: {
|
|
"zh-Hans": zhHans,
|
|
"en": en
|
|
}
|
|
}
|
|
Vue.use(VueI18n)
|
|
const i18n = new VueI18n(i18nConfig)
|
|
Vue.prototype._i18n = i18n
|
|
export default i18n
|