mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-06 04:00:06 +08:00
fix: the i18n problem of router; 🐛
修复:路由的国际化问题;
This commit is contained in:
parent
00f17f621e
commit
75e2370f1b
@ -16,7 +16,6 @@ function initI18n(locale, fallback) {
|
||||
locale,
|
||||
fallbackLocale: fallback,
|
||||
silentFallbackWarn: true,
|
||||
messages: routesI18n.messages
|
||||
}
|
||||
return new VueI18n(i18nOptions)
|
||||
}
|
||||
@ -66,6 +65,10 @@ function mergeI18nFromRoutes(i18n, routes) {
|
||||
const US = generateI18n(new Object(), routes, 'path')
|
||||
i18n.mergeLocaleMessage('CN', CN)
|
||||
i18n.mergeLocaleMessage('US', US)
|
||||
const messages = routesI18n.messages
|
||||
Object.keys(messages).forEach(lang => {
|
||||
i18n.mergeLocaleMessage(lang, messages[lang])
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
|
Loading…
x
Reference in New Issue
Block a user