May contain traces of nuts.
Tux Kowalski Rico Skipper Private Comment Contact
Welcome Friends,

This is my little corner of the Web where I keep my bits and pieces of know-how. Some of it I've written myself, some of it I've overheard at the market, and some of it has been told to me by little voices. I hope you find something useful on these pages and pass it on to others, correct me where you think I should be corrected, and comment where you feel you need to - all that we can make Linux even better and more popular.
There are no visitor comments on this page

Translating Applications

Getting Started

Translating an application is extremely easy. First, you need to obtain a template file from the developer (usually named appname.pot). All you then need is a simple text editor (GNOME's default gedit, for instance), and you need to be familiar with common software terms in both the source and target languages. For strings that are ambiguous or lack context, the developer usually provides a short comment to aid the translator. If you still run into difficulties, have a look at the software in action, or ask the developer for clarification (the E-mail address is usually in the first few lines of the .pot file).

Translating Simple Text

The .pot file consists of a header, followed by alternating msgid and msgstr keys. The former contain the original text, while the latter should be used by you to type in the translation. You are only interested in these two, and you may only edit the msgstr.

msgid "I am an example"
msgstr "Je suis un exemple"

Translating Multiline Text

Newline characters (\n) must ALWAYS be at the same position as in the source text, and you must NEVER add or delete a line or a newline character!

msgid ""
"Copyright (c) 2012 SOMEBODY\n"
"Thanks to SOMEBODY ELSE."
msgstr ""
"Copyright (c) 2012 ALGUIEN\n"
"Gracias a OTRA PERSONA."


Since it is nearly impossible to replicate the word order, plural forms, articles, etc. into the target language, developers use so called placeholders, or substitutions. These are LITERALS placed in curly braces that you copy to the translation without making a change. The application replaces these at runtime regardless of the language. The same is used when the content changes dinamically.

msgid "There are {num_seconds} seconds left for user {user_name}"
msgstr "Benutzer {user_name} hat noch {num_seconds} Sekunden Zeit"

Signing Your Work

After you translate all the strings, look for the following line in the header:

"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"

and replace it with your own name and address. You must provide valid information - it affects future communication, bug reports, etc. as well as making it possible to credit your contribution in the appropriate places.

Renaming the .pot File

The naming convention for translation files is as follows:

language_LOCALE.po (note, there is no t in the extension of the translation)

where language is a 2 letter lowercase ISO 639-1 language code and LOCALE is a 2 letter uppercase ISO 3166-1 country code. All this is connected with the "_" character.

How you follow this depends on whether you are only internationalising, or both internationalising and localising:

#Let's suppose you are internationalising to English, providing a general English translation:

#Now here you have made an English internationalisation but with two localised versions, each containing the British and American translations, respectively:


#Here is general Spanish vs. Mexican:

Submitting Your Work

Version control, bazaar, and the rest are beyond the scope of this text. Unless you have been instructed otherwise, simply send the file to the first E-mail address at the top of your .po(t) file.


Poedit is a nice GTK+ translation tool. If you have a larger project and you don't want to type directly into the .pot file, you may wish to give it a try.


See the translation template file for the xeroxscanner application here, and over here is the finished .po file of the German translation for the same app.

Add your comment to this page

Note: If you wish to report a bug, request a feature, or ask a question about an application - please do so by using the appropriate Launchpad link on the application's page.

Prove you're human
6 + 6 =
Please wait, this could take a second...