feat: 添加国际化支持,更新相关配置和组件,优化余额格式化

This commit is contained in:
2025-12-13 20:03:34 +07:00
parent 3866c85815
commit f5c7b1fb0a
14 changed files with 159 additions and 23 deletions

9
src/locales/en-US.json Normal file
View File

@@ -0,0 +1,9 @@
{
"wallet": {
"wallet": "Wallet",
"recharge": "Recharge",
"withdraw": "Withdraw",
"transfer": "Transfer",
"balance": "Balance"
}
}

16
src/locales/index.ts Normal file
View File

@@ -0,0 +1,16 @@
import { createI18n } from "vue-i18n";
import enUS from "./en-US.json";
import zhCN from "./zh-CN.json";
export type MessageSchema = typeof enUS;
const i18n = createI18n<MessageSchema, "en-US" | "zh-CN">({
locale: "en-US",
fallbackLocale: "en-US",
messages: {
"en-US": enUS,
"zh-CN": zhCN,
},
});
export { i18n };

9
src/locales/zh-CN.json Normal file
View File

@@ -0,0 +1,9 @@
{
"wallet": {
"wallet": "钱包",
"recharge": "充值",
"withdraw": "提现",
"transfer": "转账",
"balance": "余额"
}
}