口才和会议场景
This commit is contained in:
21
lang/i18n.js
21
lang/i18n.js
@@ -61,32 +61,29 @@ const i18n = createI18n(i18nConfig)
|
||||
export default i18n
|
||||
|
||||
|
||||
if(i18nEnable){
|
||||
console.log(`
|
||||
你已开启多语言国际化,将自动根据语言获取【lang/en.js】或【lang/en.js】文件中配置的tabbar的值,
|
||||
if (i18nEnable) {
|
||||
console.log(`
|
||||
你已开启多语言国际化,将自动根据语言获取【lang/en.js】或【lang/zh-Hans.js】文件中配置的tabbar的值,
|
||||
覆盖你在pages.json中的tabbar的值
|
||||
如果你不需要多语言国际化,请打开配置文件uni-starter.config.js找到 -> i18n -> enable把值设置为false
|
||||
`);
|
||||
`);
|
||||
let initLanguageAfter = () => {
|
||||
function $i18n(e){
|
||||
function $i18n(e) {
|
||||
// #ifdef VUE3
|
||||
return i18n.global.messages[i18n.global.locale][e]
|
||||
// #endif
|
||||
return i18n.messages[i18n.locale][e]
|
||||
}
|
||||
setTimeout(function(){
|
||||
//底部tabbar更新
|
||||
setTimeout(function() {
|
||||
// 底部tabbar更新(仅处理国际化文本,不做权限控制)
|
||||
$i18n('tabbar').split(',').forEach((text, index) => {
|
||||
// console.log(text);
|
||||
uni.setTabBarItem({
|
||||
index,
|
||||
text,
|
||||
complete: e => {
|
||||
// console.log("e: " + JSON.stringify(e));
|
||||
}
|
||||
complete: () => {}
|
||||
})
|
||||
})
|
||||
},1)
|
||||
}, 1)
|
||||
}
|
||||
initLanguageAfter()
|
||||
uni.$on('changeLanguage', e => {
|
||||
|
||||
Reference in New Issue
Block a user