Chinese Locale in Android (Part 2)

Fabio Lee
FabioHub
Published in
1 min readOct 20, 2017

Extends from my previous part 1 article of Chinese Locale in Android, I accidentally found out that the minimum resources needed:

  • en (English)
  • zh-rCN (Simplified Chinese)
  • zh-rTW (Traditional Chinese)
  • zh (Traditional Chinese)

To maintain for support of both pre & post Android 7.0 devices is not working for zh-rHK_#Hans on post Android 7.0

After some debug on post Android 7.0 devices, I find out that:

  • zh-rHK_#Hant will fall back to zh-rTW_#Hant, if zh-rTW_#Hant not available only fall back to zh
  • zh-rHK_#Hans will not fall back to zh-rCN_#Hans, it will directly fall back to zh

In order to support zh-rHK, zh-rHK_#Hant and zh-rHK_#Hans to fall back correctly on both pre & post Android 7.0 devices, I will need to change the minimum resources to keep as below:

  • en (English)
  • zh-rHK (Traditional Chinese)
  • zh-rTW (Traditional Chinese)
  • zh (Simplified Chinese)

With such resources structure, it will be able to cover China (Simplified Chinese), Taiwan (Traditional Chinese) and Hong Kong (Traditional Chinese) locale correctly on all Android devices.

--

--