Skip to content

How to configure locale for non-Chinese text? #4919

Answered by awmleer
sbue asked this question in Q&A
Discussion options

You must be logged in to vote

You can wrap your app with a ConfigProvider to change the locale. For example:

<ConfigProvider locale={enUS}>
  <App />
</ConfigProvider>

However, currently there are only zh-CN and en-US locales. But you can write a locale object by yourself and pass it to ConfigProvider. it is not hard at all, just refer to the base locale here. And of course, you can either write the locale in your own project or open a pull request to add a Spanish locale to antd-mobile.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by awmleer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants