StudyDroid Translation – A review of my experiences with Android’s i18n system

Posted by admin on September 6, 2009 under Uncategorized | 3 Comments to Read

It’s interesting how much of the internet, and android applications, are in English. It seems to have become the default language of the internet. Of course it made sense when I was first releasing StudyDroid to make it in English. I speak English, the G1 had only been released in America, and the primary users were English-speaking Americans.

However, over the last couple of months I have seen a huge surge in users from France, Germany, Japan, China, and all over Europe and Asia, while the American user base (which still makes up the majority of users) has grown much more slowly. This is obviously due to the rapid growth in the past couple of months in android phones in foreign areas.

This did pose a unique problem that I hadn’t encountered before, how to translate my Android App. This was something I wasn’t really prepared for. I am still a student, and while my classes have prepared me well for many of the obstacles that I’ve had to overcome while developing StudyDroid, translation and internationalization are things that you don’t really learn about. So I did my homework on Android’s translation system. I’ve had a little experience using gettext and CSV files in ZEND’s translation object in PHP, but I found Android’s XML system interesting.

Android has adopted their Strings.xml system to work with internationalization. You can see the detailed documentation here but, basically, you need all of your strings to be in a translated strings.xml file in a properly named folder. This system at first seems to make sense, but I’m wondering if something similar to Zend’s $translator->_() system wouldn’t be easier for something as important as Internationalization.

Obviously if I has started out by using good programming practices and put all of my static strings into a strings.xml file, this would have made my life very easy, just pop the file to a translator, and cut and paste it into the right folder. But let’s be real here, of course I didn’t do this and just hard coded all my strings into the code itself because if was easier at the time. So I had to cut and paste all of my strings into a blank strings.xml file and name them individually. This complicated XML file then had to be forwarded to translators who cut the English out and  put in their respective languages. Retrofitting my code would have been much simpler if all I had to do was wrap _() around the printable strings and then use a tool like poedit to scrape my code for translatable strings.

This system also poses problems for updates. When I add new buttons or text for the new features that I’m coding, I can’t just wrap  my strings in a function and know that everything will be handled. I have to make a new string variable in the XML and then make sure that every single translated XML file has, at the very least, a reference to my string, lest my app display the dreaded, and highly uninformative “Force Close” window. An object with the translation object inside it, that would just display the English text if no translation was found would be much easier and more stable.

tl;dr : Android needs to seriously reconsider their i18n  system, and if you’re making a new app, start out by having all of your printable strings in the strings.xml file. You’ll thank yourself later.

P.S. I’d like to thank all the translators again. Thank you guys for your work swimming around and trying to make sense of  my strings.xml files.

Chinese (Traditional) – HiAPK.com
Chinese (Simplified)   - HiAPK.com
Czech                        – Martin Janda
Italian                       - Luca F
Spanish                     - Pepe Rodriguez

StudyDroid 2.1.0

Posted by admin on September 2, 2009 under Uncategorized | 2 Comments to Read

Hey everyone, and happy ‘welcome back to school’ to you crazy semester kids.

Studydroid 2.1.0 is now on the market. New features include Touch scrolling for long cards and Internationalization to Chinese, Czech, Italian and Spanish.

I’ve also released some behind the scenes fixes for bugs on my server that should make logging in and syncing easier and more reliable.

As usual if you notices any bugs please post them in the error forum.

Now Let’s all give a nice big group hug to our wonderful translators for this version. They’ve put blood sweat and tears into making sure that you can read StudyDroid comfortably in your own language.

Chinese (Traditional) – HiAPK.com
Chinese (Simplified) – HiAPK.com
Czech – Martin Janda
Italian – Luca F
Spanish – Pepe Rodriguez

Don’t get lazy though my Studious Linguists, StudyDroid still needs translators, so If you’re tired of studying in my boring old American English, then contact me either on the forums or at dryawgmoth@gmail.con