Saturday, December 15, 2012

Android app locale settings suggestions

To all Android developers:

I am writing this message due to the fact that it is incorrect for a lot of Android app's locale settings to display Simplified Chinese instead of Traditional Chinese if the system setting is "Hong Kong". This makes a lot of noise in Hong Kong recently.

Except for China, all Chinese based region including Hong Kong, Taiwan and Macao are using Traditional Chinese but not Simplified Chinese. It is inconvenient for Traditional Chinese users to read Simplified Chinese. Hence, if your apps would like to provide both Traditional Chinese and Simplified Chinese, please use below settings:

res/value-zh <- Traditional Chinese
res/value-zh-rCN <- Simplified Chinese

Or if you would like to keep the standard TW locale:

res/value-zh <- Traditional Chinese
res/value-zh-rTW <- Traditional Chinese
res/value-zh-rCN <- Simplified Chinese

Or if you would like to specify for all region:

res/value-zh <- Traditional Chinese
res/value-zh-rHK <- Traditional Chinese
res/value-zh-rTW <-Traditional Chinese
res/value-zh-rCN <- Simplified Chinese

Never use Simplified Chinese string in value-zh as you can use value-zh-rCN to get the right result. If devices do not support rHK, all these devices could still get the correct locale if value-zh string is Traditional Chinese.

As English is also an official language in Hong Kong, if your apps support Simplified Chinese only, please put the English string to res/value-zh-rHK (At least the rHK supported device can get the right locale). Or you can send me an email with the Simplified Chinese string.xml attach, I'll try my best to help you to organize and translate the Simplified Chinese to Traditional one.

Best Regards,

Allen Chan
(An Android developer in Hong Kong)



Rizwan Ali said...

Gr8 Sharing Keep it up......thanks for sharing....

Free Download ALl Smart Phones Applications, Games, Themes

duchuy said...

hi Allen.
thanks. should i use these 2 only in my app (no values-zh folder):

so the rTW will cover for Traditional Language in Hong Kong, Macau and Taiwan. rCN for China, Singapore, etc.
Duplicating values-zh-rTW into values-zh-rHK is not a problem. but duplicating drawable images will increase the app size.
I'm based in Singapore; so I know Cantonese and Trad. Chinese are different. But we only have translation for Simp. Chinese, then Google-Translated into Trad Chinese. No resources for Cantonese translation.

Thank you.

Allen Chan said...

Hi Huy,

I think these setting would be the best for you:

value-zh <- Cover all Traditional Chinese
value-zh-rCN <- Simplified Chinese

So you can use only 2 set of drawable but still get the right result for rHK


duchuy said...

hi Allen,
Most of our Chinese-speaking customers based are in China. Malaysia and Singapore. So we cannot use zh as Traditional Chinese. We also have a substantial base of Taiwan and Hong Kong customers.
what's my concern is for Hong Kong phones, can they see zh-rTW as the main locale, instead of zh-rCN ? how about Macau?

I don't have HK friends to test and see.
my app is comGateway . perhaps you can help take a look to see if the language displayed correctly. thanks.

Allen Chan said...

Hi Huy,

Just remember, in your case you can create an alias for different locale's drawable so you don't have to duplicate the whole drawable to another folder, please find the detail here:

Hope this help!

duchuy said...

Hi Alan,
Thanks for your help.

benkax said...

Hi Allen

Thanks for your post. My Current setup is only

So as we in Singapore don't have HK device to test, i will just add a values-zh-rHK for safety purposes.