[i18n] Problem using translation.php

Otto Stolz Otto.Stolz at uni-konstanz.de
Thu Jul 20 06:25:28 PDT 2006


Hello,

I had written:
> during work on upgrading to Horde 3 + Imp 4, I found it necessary
> to amend horde/imp/po/de_DE.po; now I am trying to set my amendmends
> in force,

Jan gave a hint on the error I had encountered:
> You need the gettext binaries, not the gettext extension.

Thanks, that has set me on the right track. There was a problem
with the PHP open_basedir, and another one with two different
gettext versions (Solaris and Gnu) in the path.

However, I think, horde/po/README needs a bit of overhauling:
it describes doing translations from scratch, involving a com-
pendium, but there is little (if at all) advice for a standard
Imp installation, where you will need to add one or two entries
to existing translations, e. g. the descriptions of the IMAP
servers you want to offer to your custumers.

Without
<http://wiki.horde.org/FAQ/Admin/Install?referrer=FAQ%2FAdmin#toc8>,
I would certainly have been lost.

I suggest to add a new section to horde/po/README, between
"Prerequisites" and "Creating a new translation", as outlined
below.

Thanks again,
and best wishes,
   Otto Stolz


-------------------- Suggested wording ---------------------

Amending existent translations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To have your own texts (as supplied in the config files) displayed
in several languages, you have to
1. specify your configuration texts as gettext arguments, in English,
2. amend the  translation files for the required national languages,
3. compile those translation files.
Be sure to keep records of your amendmends, as you will probably
have to repeat steps 2 and 3, after the next update.

E. g., you plan to offer two IMAP servers to select from, in the
Webmail login screen:

1. In horde/imp/config/servers.php, you specify
      $servers['Central'] = array(
         'name' => _("Central Mail Service"),
      ...
      $servers['CompSci'] = array(
         'name' => _("Mail Service of Computer Science Dpt.")
      ...
    Note that "_()" is a standard abbreviation for "gettext()".

2. In horde/imp/po/de_DE.po you add two entries:
      msgid "Central Mail Service"
      msgstr "Zentraler Mailserver"
      msgid "Mail Service of Computer Science Dpt."
      msgstr "Mailserver Informatik"
    Likewise, you amend the translation files for other languages,
    as need may be.

3. You compile the translations using the commands:
      cd horde/imp/po/
      /opt/php4/bin/php -f \
      ../../po/translation.php make --module imp --no-compendium
    (where /opt/php4/bin/ is the path to your PHP binary).

-------------------- Suggested wording ---------------------


More information about the i18n mailing list