17 Localization

Knowing CriminalIntent is going to be a wildly popular app, you have decided to make it accessible to a larger audience. Your first step is to localize all of the user-facing text so your app can be read in Spanish or English.

Localization is the process of providing the appropriate resources for your app based on the user’s language setting. In this chapter you will provide a Spanish version of res/values/strings.xml. When a device’s language is set to Spanish, Android will automatically find and use the Spanish strings at runtime (Figure 17.1).

Figure 17.1  IntentoCriminal


Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.