I am currently working on the localisation of my app. I am supporting en
for three different regions i.e USA(default language in app), Australia(en-rAU
) and New Zealand(en-rNZ
). Now I have created 3 strings.xml
and stored them in their respective values
folder. But in the current release of the app my boss wants me to show default language i.e en-US
for the people who downloads the app in Australia . How can I load US english in Australia country with minimal changes at the app level ?
Asked
Active
Viewed 306 times
0

Phantômaxx
- 37,901
- 21
- 84
- 115

sagar suri
- 4,351
- 12
- 59
- 122
1 Answers
1
Delete the strings files from resources for countries that you don't want support. Of course the default strings file should be in English. Another way is use productFlavors from Gradle. Here you can find an answer
And here is google doc

an_droid_dev
- 1,136
- 14
- 18
-
I agree with you. just wanted to know is there any way to limit language support through gradle? – sagar suri Apr 07 '18 at 16:04
-
One doubt. I have `en` as the language for 3 different countries. How can I restrict it by region ? – sagar suri Apr 07 '18 at 16:12
-
use the suffix , for example "en-rNZ" – an_droid_dev Apr 07 '18 at 16:16
-
I tried your above solution. If I keep `resConfigs "en-rNZ"`, its only loading New Zealand `strings.xml`. how can I add the default `strings.xml` in this config ? – sagar suri Apr 08 '18 at 07:09