This page is a draft - it is work in progress


po4a (PO for anything) eases the maintenance of documentation translation using the classical gettext tools. The main feature of po4a is that it decouples the translation of content from its document.

The philosophy of Free Software is to make the technology truly available to everyone. But licensing is not the only consideration: untranslated free software is useless for non-English speakers. Therefore, we still have some work to do to make software available to everybody.

Especially in the case of technical documentation, it is essential the translations can be updated timely too.

You can use it for different document formats like


Translation of LaTeX files


Workflow for LaTeX documents esp. noweb documents:

* *.nw -> *.tex
Converting *.nw file into *.tex file. This step is only needed in case of noweb documents.
     noweave -index -delay <file name>.nw > <file name>.tex
* *.tex -> *.pot
Converting *.tex file into *.pot file. A *.pot file is a template for language specific *.po files.
    po4a-gettextize --format latex --master-charset utf8 \
    --copyright-holder "<name>" \
    --package-name "<package name>" --package-version "<version>" \
    --master <file name>.tex --po <file name>.pot
* *.pot -> *.po
Using *.pot file to create *.po file (you have to create a *.po file for each language)
    msginit --input=<file name>.pot \
    --output-file=<file name>.po \
    --locale=<ISO code for language> --no-translator

or for updating existing *.po file with msgmerge.

    msgmerge --verbose --update <file name>.po  <file name>.pot
* Translations

Translations will be done in *.po files. gtranslator (GNOME Translation Editor) is a po file editor which makes translating gettext applications as easy as possible, even for people with no translation experience.

* *.po -> *.tex
Converting *.po file into *.tex file.
     po4a-translate --format latex --master-charset utf8 \
     --master <path>/<file name>.tex \
     --localized <path>/<file name>.tex \
     --po <po-Datei>.po --keep 30
Minimal threshold for translation percentage to keep (i.e. write) the resulting file is set to 30 (default: 80). I.e. by default, files have to be translated at least at 80% to get written; here 30% are enough.
* Create book

with pdflatex

     pdflatex <file name>.tex

A bibliography can be created with bibtex.

* Create e-books

epub format:

     tex4ebook -f epub <file name>.tex <directory for the e-book>

E-books using the mobi format have to be created with calibre.

You can find a shell script to image the process.

CategoryLocalization CategorySoftware