Search code examples
androidlocalization

Android localization - How to use values folder -b qualifier


android resources folder values. What is the values**-b** option i read about here?

What i want to do is have my app support two different languages, french and spanish. But i had a thought. it would be much more organized if instead of doing strings-es.xml and strings-fr.xml if i could do this:

values-es
     |
    Strings.xml

values-fr
     |
    Strings.xml

this way if there is any other things that should be localized they can easily go into the respective folders. Is this possible ?


Solution

  • Using '-b' is a newer way of supporting locales. You can support locales using the method you indicate above, but you can also support locales by putting them in directories like this:

    values-b+es/strings.xml
    values-b+fr/strings.xml