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)

email: allen517@gmail.com

15 comments:

duchuy said...

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

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.
Huy

Unknown 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

Cheers,
Allen

duchuy said...

hi Allen,
Thanks.
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.

Unknown 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:

http://developer.android.com/guide/topics/resources/providing-resources.html#AliasResources

Hope this help!
Allen

duchuy said...

Hi Alan,
Thanks for your help.

Anonymous said...

Hi Allen

Thanks for your post. My Current setup is only
values-zh-rCN
values-zh-rTW

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

Thanks,
Ben

Unknown said...

Hi all,
Could someone please help me to show what code define for -r in values-zh-rCN?
I know that Locale form is zh-CN.
Thanks

Unknown said...

Hello everyone! If you are dealing with Android app localization, I recommend to check out this software localization management tool https://poeditor.com/. It is a collaborative translation platform, useful for both translators and project managers, designed to simplify the localization workflow.

Anonymous said...

Hi all,

That is a good suggestion,but if your app is used in singapore,

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

will cause a problem because singapore is using simplifed chinese




Best regards,
Jeff Chung

Perraco Labs said...

Hello Allen. I was about to set my configuration to be:

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

But, in the above comment from Jeff Chung he says that it would be a problem for Singapore. I cannot really confirm that as I'm not able to test it.
But if is true that happens this problem, then is there a solution to avoid duplicate the strings for values-zh-rHK and values-zh-rTW?

Thanks

Unknown said...

Hello Perraco,

Android is now officially support value-zh-rHK since 5.0. So we can use this approach now:

Simplified Chinese (Default)
value-zh

Traditional Chinese
value-zh-rHK
value-zh-rTW

This can make all region showing correct locale.

Unknown said...

Hello Perraco,

Android is now officially support value-zh-rHK since 5.0. So we can use this approach now:

Simplified Chinese (Default)
value-zh

Traditional Chinese
value-zh-rHK
value-zh-rTW

This can make all region showing correct locale.

Justin said...
This comment has been removed by the author.
Augurs Technologies Pvt Ltd. said...

Android Application Development HongKong,
Hire Best iOS App Developers HongKong,
Best Mobile App Development Services HongKong,
Custom iPhone App Development Services Hong Kong

Skein Tech said...

Thanks for sharing Information to us. If someone wants to know about,I think this is the right place for you!

mobile app development
mobile app development company