中英文切换

This commit is contained in:
mmc
2026-08-14 09:02:52 +08:00
parent a8af55a856
commit 62b03bba03
94 changed files with 19723 additions and 2766 deletions

View File

@@ -5,16 +5,14 @@ import { useTranslation } from 'react-i18next';
import type { MenuProps } from 'antd';
export default function LanguageSwitcher() {
const { i18n } = useTranslation();
const { i18n ,t} = useTranslation();
const currentLng = i18n.language?.startsWith('en') ? 'en' : 'zh';
const items: MenuProps['items'] = [
{
key: 'zh',
label: (
<span style={{ fontWeight: currentLng === 'zh' ? 600 : 400 }}>
中文
</span>
<span style={{ fontWeight: currentLng === 'zh' ? 600 : 400 }}>{t('systemSetting.chinese')}</span>
),
},
{