ant-design/components/locale-provider/demo/basic.md
2016-07-29 13:47:14 +08:00

580 B

order title
1
zh-CN en-US
国际化 Localization

zh-CN

LocaleProvider 包裹你的应用,并引用对应的语言包。

en-US

Wrap your app with LocaleProvider, and apply the corresponding language package.

import { Pagination, LocaleProvider } from 'antd';
import enUS from 'antd/lib/locale-provider/en_US';

function App() {
  return (
    <div>
      <Pagination defaultCurrent={1} total={50} showSizeChanger />
    </div>
  );
}

ReactDOM.render(
  <LocaleProvider locale={enUS}>
    <App />
  </LocaleProvider>
, mountNode);