+44-20-8154-3721

+7-831-262-10-70

+7-495-545-46-62

71-75 Shelton Street, Covent Garden, London, WC2H 9JQ

42 B, ul. B. Pokrovskaya, Nizhny Novgorod, Russia, 603000

office 213, 8/1, ul. Nametkina, Moscow, Russia, 117420

Monday to Friday 08:00 to 17:00 (GMT+1)

Translation of PO Gettext files

Gettext is a library originally developed by Sun Microsystems and further implemented by the GNU project for internationalization and localization purposes. What is special about gettext? Translation is selected based on the original string and no extra key is required. You do not have to use any translation files to display text, if English is the only language used, which is undisputable advantage for the whole localizing team. The supported languages include C++, ObjectiveC, Python, Perl, PHP, EmacsLisp, Smalltalk, Java.

All localizable strings requiring translation may be exported from the software source code to POT (Portable Object Template) or PO (Portable Object) formats. Both formats have identical structure. A PO file can be made from a POT file by filling blank translation strings and adding language code to the file name. Files may also include localization team member comments starting with /// or #.

/// Comment to translator: Please do not remove placeholder %s.
msgid "My name is %s.\n"
msgstr " Je m'appelle %s.\n"

Gettext supports plural form, so it can display different messages depending on a cardinal number used. This is determined by the Plural-Forms line in the header entry of the PO file, which contains the number of plural forms and a formula. In the example below, string [0] will be used if %d = 1, 21, 31 …, and string [1] will be used if %d = 2, 3, 4, 22, 23, 24, 32, 33, 34 … A database of known plural formulas is published here.

"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100=20) ? 1 : 2);\n"

msgid "Within %d day "
msgid_plural "Within %d days "
msgstr[0] "Через %d день "
msgstr[1] "Через %d дня "
msgstr[2] "Через %d дней "

Translation of PO files in a text editor

PO files can be edited and translated in any text editor. However, when working with PO files in a text editor, there is a risk to damage the document structure or to leave untranslated text requiring localization, so this method is rarely used in practice.

You can apply different utilities to process PO files. One of the most widely used is Poedit.

Translation of PO files using CAT tools

PO format is supported by some of the modern CAT tools like Memsource, MemoQ или SDL Trados Studio.

Memsourceurce

po 1

MemoQ

po 2

ALBA Translation Agency has extensive experience of working with PO files. Our specialists can organize a workflow for each job in the most optimal and therefore cost-effective manner for our customers.