Help:Extension:Translate/Off-line translation

If you have very slow or limited internet connection or some supadupa offline tools you might want to use them instead of the web interface. Be aware however, that Translate extension is designed for collaborative process. This means that you should not hold the files offline for long times, and you should always download new file just before you start translating. Otherwise you might conflict with other translators who work in the wiki.

Export
You can download any message group as Gettext PO file by choosing the export for off-line translation task in Special:Translate. Some sites might have disabled this task. You should check any local guides how to process these files before you start.

The files are standard Gettext PO files with some extra information. The header contains some extra fields shown below. Also the msgctxt for each message contains an identifier that the Translate extension needs. Some editors are known to strip either of the header comments or msgctxt lines, so start with small file to make sure that your editor does not remove those - I tell you it's not fun to realize after you have translated hundreds of messages that you cannot import your translations back.

The message documentation is exported as translator comments. Also note that some message groups might have export option, which exports translations in the native format of that group, which might be Gettext. These are not the files that can be used for off-line translation!

Important header fields: "X-Language-Code: nl\n" "X-Message-Group: ext-abc\n"

Example entry in Translate Gettext po file. msgctxt "s_excel_export" msgid "Excel Export" msgstr ""
 * 1) . [Wiki] MantisBT-filter.png
 * 2) . [Wiki] Link on bug report. See screenshot.
 * 3) . [Wiki]
 * 4) . [Wiki] “Excel” is the name of a program; do not translate it unless Microsoft has translated the program’s name into your language (e.g., 엑셀 in Korean).

Import
There are two ways to import these files. Those users with correct user rights can use Special:ImportTranslations to upload and import the translations. The special page processes the file and shows the changes and lets user import them. For large files with lots of changes the importing might take multiple steps.

The other way is to do it with command line script in. It's less flexible but can import everything in one go. It also needs intervention from someone with shell access to the server.

The way how import of off-line translations are handled (or not) depends on your wiki.

Gettext Editors
Here are some tools you can edit the files off-line.

WARNING: make sure you are using version 1.4.2 or above, otherwise " " lines will be dropped and your work cannot be processed.
 * POedit : Available for all platforms supporting the wxWidgets toolkit, tested on Unix with GTK+ and Windows.
 * gtranslator : Can be used in the GNOME desktop environment on Unix and Linux platforms.
 * gted : To be used as plugin in the Eclipse IDE on Linux, Windows and MAC OS X, has various tools integrated.
 * Lokalize : Uses the KDE 4 Desktop Environment an all platforms supporting it. Has a user wiki and online handbook
 * Translate Toolkit : Toolkit written in the python programming language which it needs installed, usable on all platforms. Supports several other file formats as well.
 * OmegaT : Free tool for professional translators written in Java, requires Java installed, available on all platforms, supports a variety of other file formats, glosssaries, fuzzy matching, and translation memories.
 * Gorm PO file editor : Small program, runs on Windows, no installation required.
 * Better PO Editor : Available for Windows, BSD, Unix, Linux, Mac OS X. Includes spell checker and Google Translate suggestions.