tag i18n
This commit is contained in:
14
src/i18n/config/en.js
Normal file
14
src/i18n/config/en.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const en = {
|
||||
message: {
|
||||
askTodelete: "Are you sure to delete?",
|
||||
},
|
||||
content: {
|
||||
blankTip: "I am Blank.",
|
||||
},
|
||||
button: {
|
||||
ok: "OK",
|
||||
yes: "Yes",
|
||||
no: "No",
|
||||
},
|
||||
};
|
||||
export default en;
|
||||
14
src/i18n/config/zh.js
Normal file
14
src/i18n/config/zh.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const zh = {
|
||||
message: {
|
||||
askTodelete: "是否确定要删除?",
|
||||
},
|
||||
content: {
|
||||
blankTip: "我是布兰克。",
|
||||
},
|
||||
button: {
|
||||
ok: "好的",
|
||||
yes: "是的",
|
||||
no: "不",
|
||||
},
|
||||
};
|
||||
export default zh;
|
||||
16
src/i18n/index.js
Normal file
16
src/i18n/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Vue from 'vue';
|
||||
import VueI18n from 'vue-i18n';
|
||||
Vue.use(VueI18n);
|
||||
|
||||
import zh from './config/zh';
|
||||
import en from './config/en';
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: localStorage.getItem('locale') || 'en', // 语言标识
|
||||
messages: {
|
||||
zh,
|
||||
en,
|
||||
}
|
||||
})
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user