Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Android users hail from many different parts of the world. They speak different languages, use different currencies, and format their dates in different ways—just to name a few examples. Android application internationalization generally falls into three categories:
• Providing alternative resources such as strings or graphics for use when the application runs in different languages
• Implementing locale-independent or locale-specific code and other programmatic concerns
• Configuring your application for sale in foreign markets
We already discussed how to use alternative resources in Android Wireless Application Development Volume I: Android Essentials, but perhaps another example is in order. Let’s look at an application that loads resources based upon the device language settings. Specifically, let’s consider a simple application that loads different string and graphic resources based on the language and region settings of the device.