开发者

Should my Android app default to simplified or traditional Chinese?

I'm writing a localized Android app; I'm confused about how to handle the differences between simplified and traditional Chinese.

Thanks to this excellent answer I know that I should put simplified Chinese in values-zh-rCN and traditional Chinese i开发者_C百科n values-zh-rTW.

But I should presumably put something in values-zh, right? Folks in Hong Kong and Macao shouldn't just get my default (English) strings.

My question is: is it better to put traditional Chinese in values-zh? Or should I make simplified Chinese the default? (Or should I just omit the values-zh directory?)


Traditional Chinese characters (Standard characters) are referred to by several different names within the Chinese-speaking world. The government of Taiwan officially calls traditional Chinese characters standard characters or orthodox characters (traditional Chinese; simplified Chinese.

People in China, Malaysia and Singapore mainly use the simplified system, Traditional Chinese characters are currently used in Taiwan (Republic of China), Hong Kong and Macau.

I think that you should not omit that values-zh , put it as simplified Chinese or allow user to switch the language in your apps.


Android by default assumes zh to be Traditional by default, but Unicode (of which sets the standard for locale usage) uses Simplified for zh.

If your app's minimum version is Android 7.0 (API 24), then you can utilise the new locale resolution. By defining the folders as values-b+zh+Hans (Standard) and values-b+zh+Hant (Traditional), the system will automatically use the correct locale depending on which region was selected. You can still use values-zh-rTW and the like, if you need regional differences between the regions using the same variant.


I have the same issue with my app which currently uses zh-rCN and zh-rTW only which cause issues for all other regions. Unfortunately based on this question (Simplified and Traditional Chinese vs Regions), there's no actual way to determine which is best between those:

values-zh (traditional)
values-zh-rCN (simplified)

Or LOL

values-zh (simplified)
values-zh-rTW (traditional)

So I've been looking at the following alternative:

In my app I have a method that runs at the beginning to set the user-defined language, and if not actually defined I can check the current language/region and apply a patch accordingly while only keeping the zh-rCN and zh-rTW folders:

zh-rHK => zh-RTW
zh-rSG => zh-rCN
zh-rMO => zh-r?? can be both according to the link above

The method I use is partially described here: Changing locale: Force activity to reload resources?

EDIT: I've now made values-zh contain Simplified and patched the HK region to use Traditional automatically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜