feat(i18n): add backend multi-language support with user language preference
- Add go-i18n library for internationalization - Create i18n package with translation keys and YAML locale files (zh/en) - Implement i18n middleware for language detection from user settings and Accept-Language header - Add Language field to UserSetting DTO - Update API response helpers with i18n support (ApiErrorI18n, ApiSuccessI18n) - Migrate hardcoded messages in token, redemption, and user controllers - Add frontend language preference settings component - Sync language preference across header selector and user settings - Auto-restore user language preference on login
This commit is contained in:
@@ -2787,6 +2787,12 @@
|
||||
"GC execution failed": "GC execution failed",
|
||||
"Cache Directory": "Cache Directory",
|
||||
"Available": "Available",
|
||||
"输出价格": "Output Price"
|
||||
"输出价格": "Output Price",
|
||||
"偏好设置": "Preferences",
|
||||
"界面语言和其他个人偏好": "Interface language and other personal preferences",
|
||||
"语言偏好": "Language Preference",
|
||||
"选择您的首选界面语言,设置将自动保存并同步到所有设备": "Select your preferred interface language. Settings will be saved automatically and synced across all devices",
|
||||
"语言偏好已保存": "Language preference saved",
|
||||
"提示:语言偏好会同步到您登录的所有设备,并影响API返回的错误消息语言。": "Note: Language preference syncs across all your logged-in devices and affects the language of API error messages."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2732,6 +2732,12 @@
|
||||
"套餐名称": "套餐名称",
|
||||
"应付金额": "应付金额",
|
||||
"支付": "支付",
|
||||
"管理员未开启在线支付功能,请联系管理员配置。": "管理员未开启在线支付功能,请联系管理员配置。"
|
||||
"管理员未开启在线支付功能,请联系管理员配置。": "管理员未开启在线支付功能,请联系管理员配置。",
|
||||
"偏好设置": "偏好设置",
|
||||
"界面语言和其他个人偏好": "界面语言和其他个人偏好",
|
||||
"语言偏好": "语言偏好",
|
||||
"选择您的首选界面语言,设置将自动保存并同步到所有设备": "选择您的首选界面语言,设置将自动保存并同步到所有设备",
|
||||
"语言偏好已保存": "语言偏好已保存",
|
||||
"提示:语言偏好会同步到您登录的所有设备,并影响API返回的错误消息语言。": "提示:语言偏好会同步到您登录的所有设备,并影响API返回的错误消息语言。"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user