feat: 实现i18n核心配置和语言状态管理

- 创建i18n配置系统,支持简体中文/繁体中文/英文三种语言
- 实现浏览器语言自动检测和localStorage持久化
- 添加基础翻译文件,包含common、language、header、apiStats模块
- 创建locale store使用Pinia管理语言状态
- 配置语言标识符为纯文字:简/繁/EN,去除国旗emoji
This commit is contained in:
Wangnov
2025-09-08 15:40:48 +08:00
parent 504b9e3ea7
commit cb1b7bc0e3
5 changed files with 224 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
export default {
common: {
save: '保存',
cancel: '取消',
confirm: '确认',
loading: '加载中...',
edit: '编辑',
delete: '删除',
create: '创建',
update: '更新',
search: '搜索',
reset: '重置'
},
language: {
zh: '简体中文',
'zh-tw': '繁體中文',
en: 'English',
current: '当前语言',
switch: '切换语言'
},
header: {
adminPanel: '管理后台',
userMenu: '用户菜单',
logout: '退出登录',
settings: '系统设置'
},
apiStats: {
title: 'API Key 使用统计',
tutorialTitle: '使用教程',
userLogin: '用户登录',
adminPanel: '管理后台',
statsQuery: '统计查询',
tutorial: '使用教程',
timeRange: '统计时间范围',
today: '今日',
thisMonth: '本月'
}
}