Dev Guide to Translating Apps in Android

Written by:  • Edited by: Simon Hill
Updated May 3, 2011
• Related Guides: Android | Android Market | Google

How can we change the language of our Google Android application? Is it even possible? If we are developing applications we have to take this principle into account.

Imagine you have developed a great application and you want to sell it (or just put it, so people can download it and test it) in the Android Market. Maybe your potential clients are English-readers...or not! You simple don't want to loose the chance of expanding your application all over the world.

The languages we can work with are limited to the Android software, If you take your device and go to Settings and then to Locale & text you can change the language of your phone. In latest software version (latest is 1.5) you can choose between the following languages:

  • German (From different countries)
  • English (From different countries)
  • Spanish
  • French
  • Italian
  • Dutch

 

So we are limited to these languages for now. In future releases let's hope this list will increase.

When we change a language, every application text (and images, if they are well designed), change to the new language.

This is going to be VERY useful to us. Let's talk a bit more about the resources.

 

Resources & Languages

In the /res folder in the project, we have stored all the resources files we need in our application. It is up to us to use them properly. In our case, lets have a look to the most important files/folder to our purpose.

/res/values

In this folder we can find the “string.xml” file. We can...well, we MUST use this file to store all the strings we are using in the application.

/res/drawable

Here, we store the images of the application, Its preferable to store them in PNG format.

Well, once we have introduced this files / folders...but...what relationship have this with the languages? Lets see.

If we use the ISO 639-1 Code (Code for language representation) in the resources folders like this:

values-es

drawable-es

for Spanish or

values-fr

drawable-fr

for French

and you store in them the strings and the images in the proper language, every time you change the mobile language, it will change in your application too. This easy.

Want more?

Every time you create an application, you should take language use into account. After all who knows whos going to use your application... So keep this in mind from the beginning!!


Comments

Showing all 3 comments
 
Matteo Mar 7, 2011 10:42 AM
Amanuens
I think that a good opportunity to easily manage Android applications translations is to use Amanuens ( http://www.amanuens.com )
Christian Nov 19, 2010 11:24 AM
RE: Dev Guide to Translating Apps in Android
I am in my final year of becoming a certified translator and looking for an opportunity to localise some apps. Does anyone know, where to start?
ezzy Sep 20, 2010 8:24 AM
Androlate - An Eclipse plugin which translates your string resources using Google Translate
Androlate - An Eclipse plugin which translates your string resources using Google Translate. http://www.cicadalane.com/node/394
 
blog comments powered by Disqus
Email to a friend