fix: i18n
This commit is contained in:
parent
138cd4b3ae
commit
80dc439c65
|
@ -1,6 +1,5 @@
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import VueI18n from "vue-i18n";
|
import VueI18n from "vue-i18n";
|
||||||
import {request} from "../plugins/request";
|
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
|
|
||||||
// 直接加载翻译的语言文件
|
// 直接加载翻译的语言文件
|
||||||
|
@ -43,7 +42,6 @@ const importLanguage = lang => {
|
||||||
const setLang = lang => {
|
const setLang = lang => {
|
||||||
localStorage.setItem('language', lang)
|
localStorage.setItem('language', lang)
|
||||||
i18n.locale = lang;
|
i18n.locale = lang;
|
||||||
request.defaults.headers.common['Accept-Language'] = lang.replace("_", "-");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const setLanguage = lang => {
|
export const setLanguage = lang => {
|
||||||
|
|
Loading…
Reference in New Issue