feat: init
This commit is contained in:
15
src/locales/index.ts
Normal file
15
src/locales/index.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createI18n } from "vue-i18n";
|
||||
import zhCN from "./zh-CN.json";
|
||||
|
||||
export type MessageSchema = typeof zhCN;
|
||||
|
||||
const i18n = createI18n<MessageSchema, "zh-CN">({
|
||||
legacy: false,
|
||||
locale: "zh-CN",
|
||||
fallbackLocale: "zh-CN",
|
||||
messages: {
|
||||
"zh-CN": zhCN,
|
||||
},
|
||||
});
|
||||
|
||||
export { i18n };
|
||||
10
src/locales/zh-CN.json
Normal file
10
src/locales/zh-CN.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"tabs": {
|
||||
"home": "首页",
|
||||
"notify": "通知",
|
||||
"user": "我的"
|
||||
},
|
||||
"home": {
|
||||
"title": "首页"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user