add i18n
This commit is contained in:
1 parent
59728e46b3
commit
69fdb3a933
6 files changed
+126
-4
No files matched your search
@@ -0,0 +1,16 @@
|
||||
export default {
|
||||
message: {
|
||||
copied: 'Copied'
|
||||
},
|
||||
menu: {
|
||||
home: 'Home',
|
||||
editor: 'Editor'
|
||||
},
|
||||
option: {
|
||||
theme: 'Theme',
|
||||
highlight: 'Code Highlight Theme',
|
||||
bold: 'Bold',
|
||||
italic: 'Italic',
|
||||
strikeout: 'Strikeout'
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import enLang from './en/index';
|
||||
import zhLang from './zh/index';
|
||||
import enLocale from 'element-plus/lib/locale/lang/en';
|
||||
import zhLocale from 'element-plus/lib/locale/lang/zh-cn';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: zhLocale.name,
|
||||
fallbackLocale: enLocale.name,
|
||||
messages: {
|
||||
[enLocale.name]: {
|
||||
el: enLocale.el,
|
||||
...enLang
|
||||
},
|
||||
[zhLocale.name]: {
|
||||
el: zhLocale.el,
|
||||
...zhLang
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
@@ -0,0 +1,16 @@
|
||||
export default {
|
||||
message: {
|
||||
copied: '复制成功'
|
||||
},
|
||||
menu: {
|
||||
home: '首页',
|
||||
editor: '编辑器'
|
||||
},
|
||||
option: {
|
||||
theme: '主题',
|
||||
highlight: '代码高亮',
|
||||
bold: '粗体',
|
||||
italic: '斜体',
|
||||
strikeout: '删除线'
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user