add: i18n support

This commit is contained in:
XZB
2022-04-12 09:17:04 +08:00
parent e8053cb41d
commit e2941e06b8
31 changed files with 661 additions and 351 deletions

View File

@@ -1,5 +1,9 @@
import React from 'react';
import ProLayout, {PageContainer} from '@ant-design/pro-layout';
import zhCN from 'antd/lib/locale/zh_CN';
import en from 'antd/lib/locale/en_US';
import {getLang} from "../locale/locale";
import {ConfigProvider} from "antd";
import './wrapper.css';
function wrapper(props) {
@@ -15,7 +19,9 @@ function wrapper(props) {
collapsedButtonRender={Title}
>
<PageContainer>
{props.children}
<ConfigProvider locale={getLang()==='zh-CN'?zhCN:en}>
{props.children}
</ConfigProvider>
</PageContainer>
</ProLayout>
);