You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
446 B
25 lines
446 B
import {
|
|
createI18n
|
|
} from 'vue-i18n'
|
|
|
|
import en from './en.json'
|
|
import zhHans from './zh-Hans.json'
|
|
import zhHant from './zh-Hant.json'
|
|
|
|
|
|
const messages = {
|
|
en,
|
|
'zh-Hans': zhHans,
|
|
'zh-Hant': zhHant
|
|
}
|
|
uni.setLocale(uni.getStorageSync('i18n'))
|
|
|
|
console.log(' uni.getLocale()', uni.getLocale())
|
|
const i18n = createI18n({
|
|
locale: uni.getLocale(), // 获取已设置的语言
|
|
// locale: zhHans, //英文
|
|
messages
|
|
})
|
|
|
|
export default i18n
|