I'm working on an application that has localized strings for the UK, specified in res/values-en-rGB/strings.xml. My default string implementations, for the US, are in res/values/strings.xml.
Now, I'm adding additional localizations for Canada in res/values-en-rCA/strings.xml. I would like the application to behave as follows: If a user's device is localized to Canada (or their language is set to English(Canada) or French(Canada)), check if we have a string in en-rCA, and if not, fallback to the string in my default strings.xml file. However, my application currently fallbacks to strings from en-rGB when the device is set to a Canadian locale and the string is not found in en-rCA. Therefore, I have two questions:
How can I configure my app such that a device with a Canadian locale searches for a string in
en-rCAand then, if it cannot find it, defaults to the string in my defaultvaluesfolder rather thanen-rGB?How can I ensure that a device whose language is set to
French (Canada)defaults toen-rCArather than my defaultvalues, as it currently does?
I would be happy to provide an example if it would be helpful. Thanks!