Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#25 gettext for translations

i18n/l10n (13)
Appie Verschoor

On the nucleusforum there was the sugestion to use
gettext for translations:
I did some quick reading, and it sounds not bad at all.
The poster; Ruben has implemented this in squirrelmail
as well. Maybe we could give this a better look and use
it to get translations. I haven't had time to dig in
deep so I have no recommandations yet.
Appie (xiffy)


    • labels: --> i18n/l10n
    • priority: 5 --> 8
  • Logged In: YES

    I did some quick reading also. Looks interesting.

    If this can be used in a way that is not dependent on the
    existance of the php extension, we should implement it

    - source code easier to read (since english text is there)
    - language constants no longer need to be in memory (loaded
    when needed)
    - I assume that when a translation is not available, the
    english text is used?

    - ?

    What happens if the original (english) text is changed after
    the language files are created? is it easy to update the
    lang file

  • Ruben Mendes
    Ruben Mendes

    Logged In: YES

    1 - When the translation is not available the text in the
    source code is used.

    2 - When the original texts are changed we have to generate
    a new translation file (usually with .pot extension). The
    translators must then merge the changes with their current
    (outdated) translation. See
    for instructions.

    3 - Gettext is the standard way to add translation support
    so there are lot's of non-english speaking people that are
    familiar with it.

    4 - The biggest problem I see is to convert all current
    translations files to the .po getext format automatically.
    It should be scriptable but it doesn't seem a trivial problem.

    5 - It was not me who implemented the i18n in the core
    squirrelmail code. I just help with the i18n code in some
    plugins and do l10n to pt_PT.