From 3416e8fd769a8905913531d8fe78f5236d7d7b71 Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Wed, 22 May 2019 16:39:33 +0800 Subject: [PATCH] no message Former-commit-id: a4e79ebf7a44c60ffeb61db861fb00b9d721c677 [formerly a4e79ebf7a44c60ffeb61db861fb00b9d721c677 [formerly a4e79ebf7a44c60ffeb61db861fb00b9d721c677 [formerly a4e79ebf7a44c60ffeb61db861fb00b9d721c677 [formerly 63d01613b6bcb1a85ee6d314d1a12ac7989f4760 [formerly bd4a663ccf9c9f8ec0d97c2c15635fd531e27b82]]]]] Former-commit-id: 280b9c2436ba07693c840c681202b043d88c89d1 Former-commit-id: b476179e011a02f4cf1ff45b251894e49c451851 Former-commit-id: a8aafd8962ac6fe3784a13556d70ea59752acd4d [formerly f175280128b21172b0b167a7d7846a0e2faf0157] Former-commit-id: 658ff2f89f566951c2745470a237fb56f58d854b Former-commit-id: bb8e47613fe4eae42e2af74db7dd5be81685a036 Former-commit-id: 77aaccc5290d6c86d8817dd5a36808bcb09fc14d Former-commit-id: 06ca8f89c9237debb4fd026980e45dee0b31b8f6 Former-commit-id: 9152927efc1c98101f0021bc495a8fba24b36be4 --- src/App.vue | 15 ++++++++++++++- src/i18n.js | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 4d9876b9..bd4a9f2c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,8 +5,21 @@ diff --git a/src/i18n.js b/src/i18n.js index 4098f333..09581b33 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -1,5 +1,6 @@ import Vue from 'vue' import VueI18n from 'vue-i18n' +import util from '@/libs/util' Vue.use(VueI18n) @@ -24,7 +25,7 @@ Vue.prototype.$languages = Object.keys(messages).map(langlage => ({ })) export default new VueI18n({ - locale: process.env.VUE_APP_I18N_LOCALE || 'en', + locale: util.cookies.get('lang') || process.env.VUE_APP_I18N_LOCALE, fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en', messages })