docs: fix site locale (#37911)

This commit is contained in:
MadCcc 2022-10-10 12:07:20 +08:00 committed by GitHub
parent 91586f5dcd
commit da5a3ddacb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import { setTwoToneColor } from '@ant-design/icons';
import { Helmet, HelmetProvider } from 'react-helmet-async';
import { ConfigProvider } from 'antd';
import { browserHistory } from 'bisheng/router';
import zhCN from 'antd/lib/locale/zh_CN';
import type { DirectionType } from 'antd/es/config-provider';
import Header from './Header';
import type { SiteContextProps } from './SiteContext';
@ -255,7 +256,7 @@ export default class Layout extends React.Component<LayoutPropsType, LayoutState
defaultLocale="en-US"
>
<ConfigProvider
locale={appLocale.locale === 'zh-CN' ? cnLocale : undefined}
locale={appLocale.locale === 'zh-CN' ? zhCN : undefined}
direction={direction}
>
<Header {...restProps} changeDirection={this.changeDirection} />