》Android will run on many devices in many regions. To reach the most users, your application should handle text, audio files, numbers, currency, and graphics in ways appropriate to the locales where your application will be used.
》You should already have a working knowledge of Java and be familiar with Android resource loading, the declaration of user interface elements in XML, development considerations such as Activity lifecycle, and general principles of internationalization and localization.
》Resources are text strings, layouts, sounds, graphics, and any other static data that your Android application needs. An application can include multiple sets of resources, each customized for a different device configuration. When a user runs the application, Android automatically selects and loads the resources that best match the device.
》each stored in a locale-specific resource directory:
res/values/strings.xml
Contains English text for all the strings that the application uses, including text for a string namedtitle
.res/values-fr/strings.xml
Contain French text for all the strings, includingtitle
.res/values-ja/strings.xml
Contain Japanese text for all the strings excepttitle
.
Testing on an Emulator:
Changing the emulator locale from the adb shell;Creating and using a custom locale。