Yann Dirson wrote:
> it is difficult in some cases to
> find unique english strings that will be possible map one to one in
> all languages.

A common technique is to use a context marker in the msgid string,
like this:

    my_gettext ("[menu item]Open")
    my_gettext ("[combobox item]Open")

which translators can translate like this:

    msgid "[menu item]Open"
    msgstr "Ouvrir"

    msgid "[combobox item]Open"
    msgstr "Ouvert"

The my_gettext function calls gettext and, if it is returns the
untranslated string, strips the "[...]" prefix.

See also the gettext documentation, section "GUI program problems".

The only problem (quite small, IMO) with this approach is that translators
must be made aware where the context marker ends.

Bruno

--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to