Localization
Customizing your dApp's language with built-in translations
By default, RainbowKit supports the en-US
locale for English language users.
If available, RainbowKit will detect the user's preferred language and choose the appropriate translations. Developers can always override the default language.
To specify a language for your users, just add locale="zh-CN"
as a prop in your RainbowKitProvider
RainbowKit's localization support works even better with Sub-path Routing.
Configure your Next.js project like the example below to add an optional /locale/
sub-path to your routes, which will help search engines and users better discover your multi-lingual support.
Then pass the locale
provided by the Pages Router to the RainbowKitProvider
You can reference an example for the Pages Router here.
App Router does not yet support i18n. Reference our separate example here for implementation best practices with next-intl
middleware.
It is recommended that you use the same techniques to translate your dApp's content for full localization support. Localization libraries like i18n-js
and next-intl
and management tools like Crowdin will simplify this process.
We provide full support for the following locale
regions:
Language | Region | Locale | Shortform | |
---|---|---|---|---|
English | United States 🇺🇸 | en-US | en | |
中文 | Mainland China 🇨🇳 | zh-CN | zh-Hans | zh |
繁體中文 | Hong Kong 🇭🇰 | zh-HK | ||
繁體中文 | Taiwan 🇹🇼 | zh-TW | zh-Hant | |
हिंदी | India 🇮🇳 | hi-IN | hi | |
Español | Latin America 🌎 | es-419 | es | |
Français | France 🇫🇷 | fr-FR | fr | |
العربية | Middle East 🌍 | ar-AR | ar | |
Português | Brazil 🇧🇷 | pt-BR | pt | |
Русский | Russia 🇷🇺 | ru-RU | ru | |
Bahasa Indonesia | Indonesia 🇮🇩 | id-ID | id | |
日本語 | Japan 🇯🇵 | ja-JP | ja | |
Türkçe | Turkey 🇹🇷 | tr-TR | tr | |
한국어 | South Korea 🇰🇷 | ko-KR | ko | |
ภาษาไทย | Thailand 🇹🇭 | th-TH | th | |
українська | Ukraine 🇺🇦 | uk-UA | ua | |
Tiếng Việt | Vietnam 🇻🇳 | vi-VN | vi | |
Deutsch | Germany 🇩🇪 | de-DE | de |
If you would like to see support for an additional language, please open a GitHub Discussion and we'll work to support it as soon as possible.