vr-shopxo-uniapp/locale/index.js

20 lines
377 B
JavaScript
Raw Normal View History

import VueI18n from 'vue-i18n';
import Vue from 'vue';
2024-07-05 02:08:43 +00:00
import zh from './zh.json';
import en from './en.json';
let i18nConfig = {
locale: uni.getLocale(),
silentTranslationWarn: true,
messages: {
2024-07-05 02:08:43 +00:00
"zh": zh,
2026-03-10 10:01:33 +00:00
"zh-Hans": zh,
"en": en
}
2023-11-23 08:20:37 +00:00
}
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
2024-01-22 06:51:10 +00:00
Vue.prototype._i18n = i18n
export default i18n