Pseudo-localization on Android not working

443 views Asked by At

I have enabled English [XA] on my phone placed it on top of English and added this code to my build.gradle

buildTypes {
        debug {
            pseudoLocalesEnabled true
        }
    }

When I run my app I don't see my app being pseudo localized and I don't get why. I see some of the system alert dialogs being pseudo-localized and some of the settings but not everything. Am I missing something? Already looked at multiple resources (resource_1 & resource_2) about it and it seems that it's pretty straight forward to enable it and have it running but it's not.

1

There are 1 answers

0
Karim Fikani On BEST ANSWER

Figured it out and no documentation mentions (even the one from google tsk tsk) that you need to add "en_XA" to resConfigs

android {
  ...
  defaultConfig {
    ...
    resConfigs "en", "en_XA" 
    ...
  }
} 

In case the pseudolocalized strings don't show check if the strings for "en_XA" were created by decompiling the apk and check if "values-en-rXA" folder was created. If it's created you can open strings.xml and see all the strings pseudlocalized.