File tree Expand file tree Collapse file tree 4 files changed +1393
-5
lines changed
Expand file tree Collapse file tree 4 files changed +1393
-5
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ const availableLanguages: LanguageOption[] = [
7979 label: ' 简体中文' ,
8080 locale: ' zh-CN'
8181 },
82+ {
83+ key: ' zh-TW' ,
84+ label: ' 繁體中文' ,
85+ locale: ' zh-TW'
86+ },
8287 {
8388 key: ' en-US' ,
8489 label: ' English' ,
Original file line number Diff line number Diff line change @@ -96,5 +96,17 @@ export default {
9696
97971 . 在 ` locales ` 目录下创建对应的语言文件,如 ` ja-JP.ts `
98982 . 复制现有语言文件的结构,确保键名完全一致
99- 3 . 更新语言切换组件,添加新语言选项
100- 4 . 测试所有页面在新语言下的显示效果
99+ 3 . 在 ` packages/ui/src/plugins/i18n.ts ` 中:
100+ - 导入新语言文件
101+ - 添加到 ` SupportedLocale ` 类型
102+ - 添加到 ` SUPPORTED_LOCALES ` 数组
103+ - 配置 fallback 规则
104+ - 添加到 ` messages ` 对象
105+ 4 . 在 ` packages/ui/src/components/LanguageSwitchDropdown.vue ` 中添加新语言选项
106+ 5 . 测试所有页面在新语言下的显示效果
107+
108+ ## 当前支持的语言
109+
110+ - ** 简体中文 (zh-CN)** : 默认语言,适用于中国大陆用户
111+ - ** 繁體中文 (zh-TW)** : 适用于台湾、香港等地区用户,基于简体中文翻译并适配港台用语习惯
112+ - ** English (en-US)** : 英语,适用于国际用户
You can’t perform that action at this time.
0 commit comments