Commit 3cbfae45 authored by zhangyanni's avatar zhangyanni

语言包解析

parent 7e6019ba
......@@ -7,7 +7,7 @@ import publicFunc from '../common/public'
Vue.use(VueI18n);
import {Toast} from 'mint-ui';
const i18n = new VueI18n({
locale: window.sessionStorage.getItem("language"), // 语言标识
locale: window.sessionStorage.getItem("language")||"zh-CN", // 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages: {
'zh-CN': require('../common/lang/zh'), // 中文语言包
......
......@@ -2,7 +2,7 @@ import Vue from 'vue';
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);
const i18n = new VueI18n({
locale: window.sessionStorage.getItem("language"), // 语言标识
locale: window.sessionStorage.getItem("language")||"zh-CN", // 语言标识
//this.$i18n.locale // 通过切换locale的值来实现语言切换
messages: {
'zh-CN': require('./lang/zh'), // 中文语言包
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment