Translating your applications. How to localize?

When you are targeting an international audience and you have enough money to back your project up, the thing you have to do is to localize your application. Thinking that everyone knows English, is just naive. This is a general guide that shows how the process of localization works.

L10n and i18n

L10n is a short for localization and i18n for internationalization. These concepts are often mistaken to mean the same thing. However, this couldn't be further away from the truth. L10n refers to plain translation. If your application exists in another language, it has been localized, period.

I18n is much more than just translation of text. It's about translation of your application to a different culture. A localized application can only get you so far; your application should also consider the different culture and customs of the other country. For example, if your application only accepts payments through PayPal, it might not be a hit in Finland where people are not too familiar with that service. Not to mention that PayPal hasn't even been localized in Finnish!

From code to translation

What a programmer has to know about localization is GNU Gettext. This small utility fetches translatable text from your code and converts them into po files. Po is the standard file format in localization and if you manage to get the texts into that file format, the chances are that the translation agency you are using knows how to deal with the files. Not to mention the number of tools that support it!

The best part of Gettext is that it usually requires minimal chances to your code. For most of the programming languages, just surrounding your strings with brackets and a leading underscore is enough to make it localizable, e.g. _("hello world"). As easy as 1-2-3. Don't forget to give some comments for the translators about the text such as the context where it appears in the user interface.

Translating applications

Once you have managed to get the po files out, it's easy to go ahead and translate them. You can use neat tools with translation memory such as Virtaal, PO Edit or Google's online platform. If you are working on an open source project and would like to have it translated by volunteers, consider using Translate Wiki.

If you are translating the application by yourself, I would recommend to use Virtaal. It's easy and stable. And it comes with a nice tutorial translation that introduces you to the main concepts of localization and how to use them inside of the application.

Translation is hard

If you are using an external company for localization, listen to what they have to say and don't expect the result to be perfect the first time! Localization is an extremely difficult task, because the worst-case scenario is that the poor translator gets a difficult to understand or ambiguous sentence in front of him without the possibility to see the message in its context. How on earth are you supposed to translate that correctly!? Also, translators don't necessarily have the technical expertise to understand programmer's terms.

Translators might have a thing or two to say about how the original text is written in the application. From the point of view of English, a construction such as "Your flight to X" doesn't cause any problems. You can freely replace the X with words such as Paris, Rome or Helsinki and the sentence will still be correct English. This is not true for Finnish. This is because Finnish doesn't use prepositions, but cases to express the same thing. The names of the cities in nominative in Finnish are Pariisi, Rooma and Helsinki, but in the above sentence, they must appear in a different case: Pariisiin, Roomaan and Helsinkiin. Such a construction forces the translator to express the meaning in such a way that allows him to maintain the city names in the nominative case. This not only makes the translation longer but also makes it sound like a translation. This is something the translators cannot fix, but you as a programmer can.

To further illustrate the previous problem in English, imagine a situation in which you would have to express "Your flight to X" in such a way that you are not allowed to have a preposition in front of the name of the city. You could overcome it by saying "Your flight to the city named X". This indeed is correct English, but of course it doesn't sound quite right. And this is exactly the kind of translation you are going to get if you don't ask for feedback from the translators.


This was a quick introduction to the topic of localization. It's not a trivial task and should be done with enough time in an iterative fashion. If you just dump text to a translation company to translate and you get a translation no questions asked, don't expect it to yield any good results.