context sensitive translation
I had one example recently. The word "save" for a toolbar icon I translated to German "speich", but the same word in a menu item I translated to "speichern". The abbreviation was used for the toolbar because the full length word in German made the whole toolbar too long (all icons are spaced as far apart as the longest icon text requires). For the menu there is no length consideration.
There are many cases where one word is used for two meanings, needing two different words in another language. An example is the German word "Himmel" which can mean "heaven" or "sky" in English.
Gettext() has a method for doing this, but it is overly complex and requires header files to be copied from gettext.h and modified. I got around the problem by using "toolbar::save" for the toolbar and "save" for the menu, and then making a wrapper for gettext() that discards any text preceeding "::".
|