mirror of
https://github.com/XZB-1248/Spark
synced 2025-10-21 06:49:22 +08:00
add: i18n support
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
Reference in New Issue
Block a user