Add i18n modules

add Module: Internal
Array
(
)
add Module: Gettext
Array
(
    [domain] => patI18n
    [dir] => /var/www/gerd/gerd.exit0.net/htdoc/pat/i18n/test/data/gettext/mo
    [domains] => Array
        (
            [0] => Array
                (
                    [domain] => patForms
                    [dir] => /var/www/gerd/gerd.exit0.net/htdoc/pat/i18n/test/data/gettext/mo
                )

        )

)

Set current locale


Translate string of the default domain

Dieser Text ist übersetzt
Sometimes there is no translation at all!
Übersetz mich, bitte!
Übersetz uns, bitte!

How to use those funny gettext tools

Extract POT file from source code

$ xgettext -o data/gettext/po/patI18n.pot a01.php

Update German (de) translation.

$ msgmerge -U data/gettext/po/patI18n/de.po data/gettext/po/patI18n.pot
Edit the "de.po" file - in other words, translate untranlated or fuzzy string. To do so, use either you favourite text- or special catalog-editor, like PO Edit or Kbabel.

Validate message catalog (PO file)

$ msgfmt --statistics --check  data/gettext/po/patI18n/de.po -o /tmp/rubish.mo

Create binary catalog (MO file) from message catalog (PO file)

$ msgfmt --statistics --check data/gettext/po/patI18n/de.po -o data/gettext/mo/de/LC_MESSAGES/patI18n.mo