forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update docs and code style, ref: ant-design#7553#issuecomment-…
…335009581
- Loading branch information
Showing
3 changed files
with
21 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,25 +3,25 @@ order: 8 | |
title: Internationalization | ||
--- | ||
|
||
The default language of `[email protected]` is Chinese as of yet. | ||
If you want to use English or other languages, you can follow the instructions below. | ||
The default language of `[email protected]` is English as of yet. | ||
If you want to use other languages, you can follow the instructions below. | ||
|
||
## LocaleProvider | ||
|
||
antd provides a React Component [LocaleProvider](/components/locale-provider) for configuring antd locale text globally. | ||
|
||
```jsx | ||
import { LocaleProvider } from 'antd'; | ||
import enUS from 'antd/lib/locale-provider/en_US'; | ||
import frFR from 'antd/lib/locale-provider/fr_FR'; | ||
|
||
return ( | ||
<LocaleProvider locale={enUS}> | ||
<LocaleProvider locale={frFR}> | ||
<App /> | ||
</LocaleProvider> | ||
); | ||
``` | ||
|
||
Note: `en_US` is the filename, follow below. | ||
Note: `fr_FR` is the filename, follow below. | ||
|
||
Supported languages: | ||
|
||
|
@@ -30,6 +30,7 @@ Supported languages: | |
|Bulgarian|bg_BG| | ||
|Catalan|ca_ES| | ||
|Chinese (Traditional)|zh_TW| | ||
|Chinese (Simplified)|zh_CN| | ||
|Czech|cs_CZ| | ||
|Dutch (Belgium)|nl_BE| | ||
|Dutch|nl_NL| | ||
|
@@ -55,9 +56,9 @@ Supported languages: | |
|Slovak|sk_SK| | ||
|Spanish|es_ES| | ||
|Swedish|sv_SE| | ||
|Thai|th_TH| | ||
|Turkish|tr_TR| | ||
|Vietnamese|vi_VN| | ||
|Thai|th_TH| | ||
|
||
See usage and ways to contribute a new locale package at [LocaleProvider](/components/locale-provider). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters