From: Bruno H. <br...@cl...> - 2003-06-15 12:58:30
|
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 |