language code for Chinese should be start with 'zh'

According to RFC4646 (http://www.ietf.org/rfc/rfc4646.txt)
language codes for Traditional Chinese should be zh-Hant
react-native-i18n
import { getLanguages } from 'react-native-i18n'
getLanguages().then(languages => {
  console.log(languages);
});

Set system language to Chinese

01-24 17:47:47.957 19851 19873 I ReactNativeJS: [ 'zh-Hans-CN', 'en-US' ]

Set system language to English

01-24 17:56:30.754 20563 20584 I ReactNativeJS: [ 'en-US', 'zh-Hans-CN' ]

Comments

Popular posts from this blog

How to fix error : no module named sendgrid when try to use sendgrid python lib in PHP.

react-native run-android : sun.security.provider.cert path.SunCertPathBuilderException : unable to find valid certification path to req uested target

react-native run-android : do not build/update modified code(App.js)