mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
commit message
This commit is contained in:
28
seller/src/locale/index.js
Normal file
28
seller/src/locale/index.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import Vue from 'vue';
|
||||
import VueI18n from 'vue-i18n';
|
||||
import zhLocale from './lang/zh-CN';
|
||||
import enLocale from './lang/en-US';
|
||||
import zhCnLocale from 'view-design/src/locale/lang/zh-CN';
|
||||
import enUsLocale from 'view-design/src/locale/lang/en-US';
|
||||
|
||||
Vue.use(VueI18n);
|
||||
|
||||
// 根据浏览器信息自动设置语言
|
||||
const navLang = navigator.language;
|
||||
const localLang = (navLang == 'zh-CN' || navLang == 'en-US') ? navLang : false;
|
||||
const lang = window.localStorage.lang || localLang || 'zh-CN';
|
||||
|
||||
Vue.config.lang = lang;
|
||||
|
||||
// 多语言配置 vue-i18n 6.x+
|
||||
Vue.locale = () => { };
|
||||
const messages = {
|
||||
'zh-CN': Object.assign(zhCnLocale, zhLocale),
|
||||
'en-US': Object.assign(enUsLocale, enLocale)
|
||||
};
|
||||
const i18n = new VueI18n({
|
||||
locale: lang,
|
||||
messages
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
24
seller/src/locale/lang/en-US.js
Normal file
24
seller/src/locale/lang/en-US.js
Normal file
@@ -0,0 +1,24 @@
|
||||
export default {
|
||||
lili: 'lili',
|
||||
usernameLogin: 'UsernameLogin',
|
||||
mobileLogin: 'MobileLogin',
|
||||
autoLogin: 'Auto Login',
|
||||
forgetPass: 'Forget Password',
|
||||
otherLogin: 'Sign in with',
|
||||
regist: 'Register',
|
||||
login: 'Login',
|
||||
logining: 'Logining...',
|
||||
home: 'home',
|
||||
switchLangTitle: 'Switch Lang',
|
||||
international: 'Switch Lang',
|
||||
userCenter: 'Account Center',
|
||||
changePass: 'Account Pass',
|
||||
logout: 'Logout',
|
||||
tagOption: 'Label Options',
|
||||
closeAll: 'Close All',
|
||||
closeOthers: 'Close Others',
|
||||
help: 'Help',
|
||||
privacy: 'Privacy',
|
||||
terms: 'Terms',
|
||||
rights: 'All Rights Reserved'
|
||||
};
|
||||
24
seller/src/locale/lang/zh-CN.js
Normal file
24
seller/src/locale/lang/zh-CN.js
Normal file
@@ -0,0 +1,24 @@
|
||||
export default {
|
||||
lili: 'lili',
|
||||
usernameLogin: '账户密码登录',
|
||||
mobileLogin: '手机号登录',
|
||||
autoLogin: '自动登录',
|
||||
forgetPass: '忘记密码',
|
||||
otherLogin: '其他方式登录',
|
||||
regist: '注册账户',
|
||||
login: '登录',
|
||||
logining: '登录中...',
|
||||
home: '首页',
|
||||
switchLangTitle: '切换语言',
|
||||
international: '多语言切换',
|
||||
userCenter: '个人中心',
|
||||
changePass: '修改密码',
|
||||
logout: '退出登录',
|
||||
tagOption: '标签选项',
|
||||
closeAll: '关闭全部',
|
||||
closeOthers: '关闭其他',
|
||||
help: '帮助',
|
||||
privacy: '隐私',
|
||||
terms: '条款',
|
||||
rights: '版权所有'
|
||||
};
|
||||
Reference in New Issue
Block a user