diff --git a/nuxt.config.js b/nuxt.config.js index 0bf2fa6..5a0dc31 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -18,6 +18,9 @@ module.exports = { */ head: { title: 'VEUI', + htmlAttrs: { + lang: 'zh-Hans' + }, meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, diff --git a/plugins/i18n.js b/plugins/i18n.js index 0b3838d..51d5410 100644 --- a/plugins/i18n.js +++ b/plugins/i18n.js @@ -7,5 +7,5 @@ Vue.use(VueI18n) export default ({ app, route }) => { app.i18n = new VueI18n() - i18nMgr.locale = getLocale(route.path) + i18nMgr.locale = app.i18n.locale = getLocale(route.path) }