Part 5 - Application Localization and String Resources

PDF for offline use:
Related Links:

Let us know how you feel about this.

Thanks for the feedback!

Application localization is the act of providing alternate resources to target a specific region or locale. For example, you might provide localized language strings for various countries, or you might change colors or layout to match particular cultures. Android will load and use the resources appropriate for the device’s locale at runtime time without any changes to the source code.

For example, the image below shows the same application running in three different device locales, but the text displayed in each button is specific to the locale that each device is set to:

In this example, the contents of a layout file, Main.axml looks something like this:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""

In the example above, the string for the button was loaded from the resources by providing the resource ID for the string.

Localizing Android Apps

Read the Introduction to Localization for tips and guidance on localizing mobile apps.

The Localizing Android Apps guide contains more specific examples on how to translate strings and localize images using Xamarin.Android.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.