Monday 1 April 2013

Android App Transaltion

Android has quite a nice system to allow translation and localization of apps. You store all your strings in an xml file abstracted from your code called strings.xml. You can then provide a different strings.xml for each language you want to support by storing the new strings.xml in a separate values folder. For example, if I translated an app to Irish, I would add a new values folder values-ga as ga is the two letter language code for Irish. Then I would place my new translated strings.xml into that folder.

Here's an example of how I added Irish language support to my Jupiter Broadcasting app

As you may have noticed from some of my earlier posts. I'm a great believer in providing software, especially opensource software to users in their own language so I have created a form to allow users to easily translate the JB app to their native tongue.

I also encourage anyone who would like to have a slightly more impressive Github profile to copy my example commit and send me a pull request with a strings.xml in a language which you know well*.

Another way to get involved in open source translation is to create a launchpad account and start translating your favourite project on launchpad. I myself have helped with the translation of Ubuntu's Unity and MojoSetup, an opensource cross-platform installer used by many Humble Bundle games, to the Irish language.

* Please don't just use Google translate I want the experience to be as good as possible for users.

No comments:

Post a Comment