国际化
This commit is contained in:
22
locale/index.js
Normal file
22
locale/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
import en from './en.json'
|
||||
import zhHans from './zh-Hans.json'
|
||||
const messages = {
|
||||
'en': en,
|
||||
'zh-Hans': zhHans
|
||||
}
|
||||
|
||||
let i18nConfig = {
|
||||
silentTranslationWarn: true,
|
||||
locale: uni.getLocale(),
|
||||
messages
|
||||
}
|
||||
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
Vue.use(VueI18n)
|
||||
|
||||
const i18n = new VueI18n(i18nConfig)
|
||||
|
||||
export default i18n
|
||||
|
||||
Reference in New Issue
Block a user