From 52d63396c5f908203c86df6502d21ccfa827a2a1 Mon Sep 17 00:00:00 2001 From: SunLxy <1011771396@qq.com> Date: Sun, 8 May 2022 00:04:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=8D=95=E4=B8=AA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=80=E7=A7=8D=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/src/Layout.tsx | 7 +++++-- website/src/components/useMdData/index.ts | 2 +- website/src/language/Select.tsx | 8 ++++---- website/src/language/i18n.ts | 18 ++++++++---------- website/src/language/language.json | 15 +-------------- website/src/language/locale/en.json | 7 +++++++ website/src/language/locale/zh.json | 7 +++++++ website/src/pages/docs/index.tsx | 4 ++-- website/src/pages/example/index.tsx | 2 +- 9 files changed, 36 insertions(+), 34 deletions(-) create mode 100644 website/src/language/locale/en.json create mode 100644 website/src/language/locale/zh.json diff --git a/website/src/Layout.tsx b/website/src/Layout.tsx index 4ecec94..d7a0a45 100644 --- a/website/src/Layout.tsx +++ b/website/src/Layout.tsx @@ -4,17 +4,20 @@ import GitHubCorners from '@uiw/react-github-corners'; import '@wcj/dark-mode'; import styles from './Layout.module.less'; import Language from './language/Select'; +import { useTranslation } from 'react-i18next'; + export function Layout() { + const i18next = useTranslation(); return (