mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-20 04:24:29 +08:00
29 lines
484 B
Markdown
29 lines
484 B
Markdown
# 国际化
|
|
|
|
- order: 1
|
|
|
|
用 `LocaleProvider` 包裹你的应用,并引用对应的语言包。
|
|
|
|
---
|
|
|
|
````jsx
|
|
import { Pagination, LocaleProvider } from 'antd';
|
|
import enUS from 'antd/lib/locale-provider/en_US';
|
|
|
|
const App = React.createClass({
|
|
render() {
|
|
return (
|
|
<div>
|
|
<Pagination defaultCurrent={1} total={50} showSizeChanger />
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
ReactDOM.render(
|
|
<LocaleProvider locale={enUS}>
|
|
<App />
|
|
</LocaleProvider>
|
|
, mountNode);
|
|
````
|