Of course you do.
Definitions vary, but the basic idea is generally easily summarised:
- Internationalisation is the process of designing a software application so that it can be adapted to various languages and regions without engineering changes.
- Localisation is the process of adapting internationalized software for a specific region or language by adding locale-specific components and translating text.
These two terms usually go hand-in-hand as the term 'globalisation'. See?
.. Course you do.
Each language is given a language code such as 'en-au' for Australian English, or 'en-us' for American English. These language codes are two-letter lowercase ISO language codes (such as "en") as defined by ISO 639-1.
But how do we use this? And how can we easily apply these concepts to our Android programming?
.. Good question!
Best practices in Android suggests defining all your string resources in a 'strings.xml' file (you're doing this already, right?) and placing that file in the 'res\values' folder in your project.
Localisation in Android is as simple as creating a new version of this file and folder, renaming the 'values' folder to 'values' + the language code you wish to support.
For example, all your Italian translations would be located in 'res\values-it\strings.xml', your Chinese translations in 'res\values-zh\strings.xml' as seen here:
If you don't happen to have a friend from whatever country you're trying to translate your app for, just use Google translate.
Once you're done your app is one simple step away from global domination.
All you need to do is copy those freshly translate strings back into a strings.xml file in Eclipse, and, as long as the folder the strings.xml file is located in has the name of 'values' + the language code you're wishing to support, magically any user who has their phone locale set to a locale that uses that language, your translated strings will be used.
No code changes are required.