Other · LocaleProvider
LocaleProvider
Internationalized components to provide multilingual support for Semi components

Languages supported

Minimum supported versionLanguage
v0.0.1Simplified Chinese: zh_CN
v0.7.0English: en_GB, Japanese: ja_JP, Korean: ko_KR
v1.8.0Arabic: ar
v1.11.0Vietnamese: vi_VN、Russian: ru_RU、Indonesian: id_ID、Malay: ms_MY、Thai: th_TH、Turkish: tr_TR
v1.17.0Portuguese: pt_BR
v1.28.0Traditional Chinese: zh_TW
v2.2.0Spanish: es
v2.15.0Italian: it、French:fr、German:de
v2.21.0Romanian: 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