Tag Archives: AndroidStudio

Multilingual app in Android

Android considers English as primary language by default and loads the string resources from res ⇒ values ⇒ strings.xml. When you want to add support for another language, you need to create a values folder by appending an Hyphen and the ISO language code. For example if you want to add support for Urdu, you should create a values folder named values-ur and keep a strings.xml file in it with all the strings translated into French language.

So for example if in your strings.xml you have a value like

<string name=”new_equipment”>Nouveau Équipement</string>

the corresponding entry in strings-ur.xml would be

<string name=”new_equipment”> نئی مشین</string>

After created respective strings.xml files for all your supported languages all you have to do is change the Language under the Settings ⇒ Language & Input and it will change the language of the app.