Based on the Android documentation :
- https://developer.android.com/training/basics/supporting-devices/languages
- https://developer.android.com/guide/topics/resources/localization
I have created a ressource file for the zh locale :
And I have started two emulator: one using english as locale, and one using zh_TW_#Hant
.
And yet, every strings are in english.
I tried to follow the Android documentation, but it is not working so I assumed my configuration is wrong. I restarted devices, and checked the files many times. What could be wrong ?
Is there a way to know if the system is looking for the zh ressource and failed to find it, or if it immediately looking for the default one ?
Edit: I have tried the following configurations :
- using
values-zh/
instead ofvalues-b+zh/
for the phone inzh_TW_#Hant
still loads the default strings. - all Locales on emulators are changed through the phone settings.
- using
values-es/
and a phone in Spanish works perfectly. - using
values-zh-TW/
for the phone inzh_TW_#Hant
works !
So the issue I don't understand is why the Spanish+Region loads the es file, whereas the Chinese+Region does not load the zh file ?