Internationalization

The default language of antd@2.x is Chinese as of yet. If you want to use English or other languages, you can follow the instructions below.

LocaleProvider#

antd provides a React Component LocaleProvider for configuring antd locale text globally.

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

return (
  <LocaleProvider locale={enUS}>
    <App />
  </LocaleProvider>
);

Note: en_US is the filename, follow below.

Supported languages:

LanguageFilename
Bulgarianbg_BG
Catalanca_ES
Chinese (Traditional)zh_TW
Czechcs_CZ
Dutch (Belgium)nl_BE
Dutchnl_NL
English (Global)en_GB
Englishen_US
Estonianet_EE
Finnishfi_FI
French (Belgium)fr_BE
French (France)fr_FR
Germande_DE
Greekel_GR
Italianit_IT
Japaneseja_JP
Koreanko_KR
Norwegiannb_NO
Persianfa_IR
Polishpl_PL
Portuguese (Brazil)pt_BR
Portuguesept_PT
Russianru_RU
Serbiansr_RS
Slovaksk_SK
Spanishes_ES
Swedishsv_SE
Turkishtr_TR
Vietnamesevi_VN
Thaith_TH

See usage and ways to contribute a new locale package at LocaleProvider.

i18n sample#

We also provide you a complete sample of internationalization usage, which is using react-intl and LocaleProvider: ant-design/intl-example.