question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How does' locale= 'zh-cn' take effect on android devices

See original GitHub issue

Issue

I set ‘locale=’ zh-cn 'but it doesn’t work on android devices. Is there any way?

Expected Behavior

Code

<DatePicker
                style={styles.DatePicker}
                date={this.state.QuotedTimeByStart}
                mode="date"
                placeholder="起始时间"
                format="YYYY-MM-DD"
                locale="zh-cn"
                confirmBtnText="确定"
                cancelBtnText="取消"
                showIcon={false}
                androidMode="spinner"
                onDateChange={(date) => {this.setState({QuotedTimeByStart: date})}}
            />

Environment

  1. react-native -v: 0.57.2
  2. node -v: 8.11.1
  3. npm -v:6.4.1
  4. yarn --version:1.12.1
  5. target platform: Android | iOS
  6. operating system:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
vitozyfcommented, Dec 18, 2018

locale=“zh-cn” When the system language is Chinese, the components are also Chinese

0reactions
Ray-56commented, Dec 18, 2018

@vitozyf How do I code this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Locale.LanguageRange - Android Developers
A language range is an identifier which is used to select language tag(s) meeting specific requirements by using the mechanisms described in Locale...
Read more >
Android Simplified Chinese and traditional chinese not working
It can be tricky to support both old locales and new locales correctly in some cases; here I will discuss one I happen...
Read more >
Demystifying Chinese languages in the app world - Medium
To do this, in Google Play Console, in the Main store listing page open Manage translations. Now check Chinese (Simplified) — zh-CN, Chinese...
Read more >
Localization for simplified and traditional chinese
for both zh-CN and zh-TW locales. so is that i cannot add region code ... so what i have done now is if...
Read more >
luni/src/main/java/java/util/Locale.java - platform/libcore
* <p>It is also a mistake to assume that all devices have the same locales available. * A device sold in the US...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found