4/12/2018 - 3:40 AM

UI Basics - Localisation


  • Any text that you would expect to be translated like labels and titles and button descriptions should all be defined as a string resource in res/values/strings.xml

  • Create a new values folder with the pattern value-xx, where xx can be the abbreviation of any language from the ISO 639 code list here, for example res/values-fr/strings.xml will contain the french version of the strings.xml file with all the strings translated from the default language to french.

  • This way, when a user who has set up their phone to use french as the default language, android will automatically load the french version of strings and use all the pre-translated french labels.

  • You would still want to use the strings recourses for strings that you don't intend to translate, for such strings use

    hh:mm a

Language Code List


Localization Checklist


Udacity Link