From fa9468a7d39819757fbc1b80793d1fe86a7d21df Mon Sep 17 00:00:00 2001 From: Justineo Date: Thu, 5 May 2022 15:52:28 +0800 Subject: [PATCH] fix: use zh-hans as the default lang --- nuxt.config.js | 3 +++ plugins/i18n.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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) }