What is the two-letter iso code

Hi Forums,

What is actually returned by iOS and Android when writing system.getPreference(“locale”, “language”) if the user has selected Simplified Chinese or Traditional Chinese?

As far as I can see, there is no two letter code for traditional and simplified, just 5 letter codes. I have a hard time testing this, since it requires setting the language on my iPhone to Chinese. It is not like it’s written Chinese in the settings dialog, it’s a bunch of whacky characters… [import]uid: 21746 topic_id: 24112 reply_id: 324112[/import]

Try system.getPreference(“ui”, “language”) [import]uid: 69841 topic_id: 24112 reply_id: 97293[/import]

Well, that doesn’t help much, since the problem remains the same. I don’t know Chinese, and therefore I can’t go into the phone’s settings menu and change to Chinese. Just take a look in the settings on your phone and you’ll see why. I have 4 choices to choose from with letters I dont understand:

Norsk
English
Francais
Deutch
???
Nederlands
Italiano
Espaniol
Portugues

???
???
???
Pyccknn
Polski

And so on.

Therefore I need to know:

For users that have set their phone to use Traditional or Simplified Chinese, WHAT is returned by this code?

system.getPreference(“locale”, “language”)

Ansca? You must be able to answer this, it’s your goddamn SDK! :slight_smile: [import]uid: 21746 topic_id: 24112 reply_id: 97298[/import]

Chines is zh

http://www.loc.gov/standards/iso639-2/php/code_list.php
[import]uid: 69841 topic_id: 24112 reply_id: 97300[/import]

Yes, I know. But since system.getPreference(“locale”, “language”) returns TWO-letter iso codes, there must be a way to differntiate between Traditional and Simplified. zh says Chinese, but nothing about if the user has selected Traditional or Simplified… [import]uid: 21746 topic_id: 24112 reply_id: 97301[/import]

Also try

system.getPreference(‘locale’, ‘identifier’)
system.getPreference(‘locale’, ‘country’)
system.getPreference(‘ui’, ‘language’)

and see if one of them gives you the country code – for instance, TW is Taiwan, where they use traditional Chinese (as they do in Hong Kong). Haven’t checked on the iPhone recently but I tried system.getPreference(‘locale’, ‘identifier’) on my Android Xoom and it gave me e.g. “en_US” for English.

Also, here’s how you switch to Chinese on iOS – look for

??? = Simplified Chinese (China mainland)
??? = Traditional Chinese

Make sure you memorize how to get to these settings (by dialog position) so that you are able to switch back to English later on.

Note that Traditional Chinese and Simplified Chinese bear a relation, so people in either location *may* be able to read the characters of the other location (but there may be small political or cultural dislike of a particular form, depending on location).

I’ve translated my games to Chinese (I’m only using ZH, then serve Simplified) and it might be a powerful download location – in fact, China is getting me the most downloads of all countries by far. [import]uid: 10284 topic_id: 24112 reply_id: 97305[/import]

Thanks Philipp, this information is valuable! Especially how it looks in the language menu. Now I have what I need to test. [import]uid: 21746 topic_id: 24112 reply_id: 97306[/import]