Sunday, 31 March 2013

Vala #6: Localization


Software applications are usually developed in a single language. So even though a programmer in Russia would be writing code using English keywords, the user interface and the messages in the application would probably be in Russian. Localizing an application involves writing the application in such a way that it can be easily translated to other languages.

The most common method is to keep all strings in an external resource file. Separate files are created for each language, and depending on the language selected by the user, the strings are loaded from the corresponding file on application startup. Separating the strings from the source code is important. It allows separate translation teams to work on translating the resource files while the developers can focus on application development.