Gettext for translators

From PmaWiki
Jump to: navigation, search


[edit] About Gettext

You can find basic information about Gettext on Wikipedia. In short, it is a standard tool for translating applications. The po format (source format for translations) is supported by wide range of editors and tools.

[edit] Editing translations

The translations (po files) are utf-8 plain text files, which you can translate with any editor. However as the format is quite standard, there is wide range of editors, which will help you editing it. For example there is Poedit (standalone editor) or gted (Eclipse plugin). For sure you can find much more of them.

[edit] Web based translation

You can also use our translation server and do the changes online.

By default, every logged in user can translate, if you want to have more control over the translation, the privileges can be adjusted so that only selected users can translate and other ones only contribute. If you want to do so, please write to Michal Čihař.

The changes made through web interface are comitted under your name to a local branch, which is then occasionally (usually every day) merged and pushed to master.

[edit] Generating .mo files

Gettext .po files are used for editing, but the application itself is using binary files to avoid overhead of parsing text files. Before being able to use the translation, they need to be generated. You can do this by executing the script


It compiles the .mo files, prints translations stats and reports errors in translations. You need to have gettext installed to use this script.

[edit] Adding new translations

To add new translation for phpMyAdmin, you need to invoke:

msginit -i po/phpmyadmin.pot -l LANG_CODE --no-translator -o po/LANG_CODE.po

For the documentaiton, it is enough to add language code into LANGUAGES list in Makefile.

Personal tools