Other · LocaleProvider
LocaleProvider
Internationalized components to provide multilingual support for Semi components
Languages supported
Minimum supported version | Language |
---|---|
v0.0.1 | Simplified Chinese: zh_CN |
v0.7.0 | English: en_GB, Japanese: ja_JP, Korean: ko_KR |
v1.8.0 | Arabic: ar |
v1.11.0 | Vietnamese: vi_VN、Russian: ru_RU、Indonesian: id_ID、Malay: ms_MY、Thai: th_TH、Turkish: tr_TR |
v1.17.0 | Portuguese: pt_BR |
v1.28.0 | Traditional Chinese: zh_TW |
v2.2.0 | Spanish: es |
v2.15.0 | Italian: it、French:fr、German:de |
v2.21.0 | Romanian: ro |
Components supported
DatePicker、TimePicker、Modal、Pagination、Select、Table、Cascader、Calendar、TreeSelect、List、Typography、Transfer、Nav、Upload
How to use
LocaleProvider
uses the context feature of React, and you only need to wrap the periphery of the application once to take effect globally.When you need to switch the language, you can directly switch the locale passed in by the props.
Code example
Internationalization
Custom Internationalization Component
When your custom component also wants to consume the localeCode in the Semi LocaleProvider Context or read the i18n text localeData of a specific component, you can use LocaleConsumer to get it
Components that support multilingualism
The example gives all the current multilingual components