Help:Extension:Translate/Off-line translation/en

This page explains how to translate off-line. If you're interested in this, you probably already know what Gettext PO files are. For this reason, we'll only discuss how to use them in a wiki with the Translate extension here. Otherwise, you're probably more interested in the How to translate tutorial for online translation.

More in general, you might want not to use the web interface if you have a very slow or limited internet connection or offline tools that you can't do without. Be aware, however, that the Translate extension is designed as a collaborative process. This means that you should not hold the files offline for long times, and you should always download a 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; the  for each message contains an identifier that the Translate extension needs. Some editors are known to strip either the header comments or the  lines, so start with a small file to make sure that your editor does not remove these – it's not funny to realize the editor was buggy after translating hundreds of messages that you cannot import back into the online system! The message documentation is exported as translation comments.

Important header fields: "X-Language-Code: nl\n" "X-Message-Group: ext-abc\n" In this example, "ext-abc" is the name of the message group. For translatable pages, the corresponding message group has the name "page-" + the page name (i.e. for the page "Example", the header would contain the line ).

Example entry in a Translate Gettext po file.
 * 1) . [Wiki] This text is used on the history tab.
 * 2) . [Wiki]

msgctxt "history_short" msgid "History" msgstr "Versionsgeschichte"

Import
There is no need to translate the file completely. Uploading partially translated message groups is perfectly fine. There are two ways to import these files.

The users with correct user rights can use Special:ImportTranslations to upload and import the translations. The special page processes the file, shows the changes and lets the user import them. For large files with lots of changes the importing might take multiple steps, as the processing time is limited.

Importing can also be done using a command line script in.

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

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


 * POedit : Available for all platforms supporting the wxWidgets toolkit, tested on Unix with GTK+ and Windows.