Android Internationalization and localization (I18N and L10N) Coding for Localization : Creating default strings and resources

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

The first step for coding for localization is to create default resources. This step is so implicit that many developers do not even think about it. However, creating default resources is important because if the device runs on an unsupported locale, it would load all of its resources from the default folders. If even one of the resources is missing from the default folders, the app would simply crash.

The default set of strings should be put in the following folder at the specified location:

res/values/strings.xml 

This file should contain the strings in the language that majority users of the app are expected to speak.

Also, default resources for the app should be placed at the following folders and locations :

res/drawable/
res/layout/

If your app requires folders like anim, or xml, the default resources should be added to the following folders and locations:

res/anim/
res/xml/
res/raw/


Got any Android Question?