feat(i18n): 实现应用国际化支持,添加中英文翻译
- 为所有UI组件添加国际化支持,替换硬编码文本 - 新增useI18n钩子函数统一管理翻译 - 完善中英文翻译资源,覆盖统计、用药、通知设置等模块 - 优化Tab布局使用翻译键值替代静态文本 - 更新药品管理、个人资料编辑等页面的多语言支持
This commit is contained in:
10
hooks/useI18n.ts
Normal file
10
hooks/useI18n.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const useI18n = () => {
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
return {
|
||||
t,
|
||||
i18n,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user