12.4. Translating

The gettext system greatly reduces the number of things that must be tracked by a translator. Strings to be translated are extracted from the original document into a PO file. Then a PO editor is used to enter the translated versions of each string.

The FreeBSD PO translation system does not overwrite PO files, so the extraction step can be run at any time to update the PO file.

A PO editor is used to edit the file. editors/poedit is shown in these examples because it is simple and has minimal requirements. Other PO editors offer features to make the job of translating easier. The Ports Collection offers several of these editors, including devel/gtranslator.

It is important to preserve the PO file. It contains all of the work that translators have done.

Example 12.3. Translating the Porter's Handbook to Spanish

Enter Spanish translations of the contents of the Porter's Handbook.

  1. Change to the Spanish Porter's Handbook directory and update the PO file. The generated PO file is called es_ES.po as shown in Table 12.1, “Language Names”.

    % cd ~/doc/es_ES.ISO8859-1/books/porters-handbook
    % make po
  2. Enter translations using a PO editor:

    % poedit es_ES.po

All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/

Questions that are not answered by the documentation may be sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.