2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 1
|
2016-07-29 10:13:59 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 国际化
|
|
|
|
en-US: Localization
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2016-03-03 16:28:02 +08:00
|
|
|
|
2016-07-29 10:13:59 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2016-03-03 16:28:02 +08:00
|
|
|
用 `LocaleProvider` 包裹你的应用,并引用对应的语言包。
|
|
|
|
|
2016-07-29 10:13:59 +08:00
|
|
|
## en-US
|
|
|
|
|
2016-07-29 13:47:14 +08:00
|
|
|
Wrap your app with `LocaleProvider`, and apply the corresponding language package.
|
2016-07-29 10:13:59 +08:00
|
|
|
|
2017-02-13 10:55:53 +08:00
|
|
|
````jsx
|
2016-03-03 17:43:38 +08:00
|
|
|
import { Pagination, LocaleProvider } from 'antd';
|
2016-03-03 16:28:02 +08:00
|
|
|
import enUS from 'antd/lib/locale-provider/en_US';
|
|
|
|
|
2017-02-20 22:09:13 +08:00
|
|
|
const App = () => (
|
2017-02-20 21:47:57 +08:00
|
|
|
<div>
|
|
|
|
<Pagination defaultCurrent={1} total={50} showSizeChanger />
|
|
|
|
</div>
|
|
|
|
};
|
2016-03-03 16:28:02 +08:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<LocaleProvider locale={enUS}>
|
|
|
|
<App />
|
|
|
|
</LocaleProvider>
|
|
|
|
, mountNode);
|
|
|
|
````
|