I am rewriting our older application using wxWidgets. The application uses the old, home made mechanism of language dictionaries, and I would like to replace it using the standard gettext
way supported by the wxWidgets.
The problem is that the application does not use user-readable strings inside, but rather symbolic identifiers that should be translated using the chosen language dictionary. In other words, the translation should always happen. For example, the code says:
wxMenu * mnuParamSelect = new wxMenu();
mnuParamSelect->Append(wxID_mnuiParamSelect,
_("mnuiParamSelect"),
_("hlpParamSelect"));
This way, it uses a default symbolic language that must be always translated (like the symbolic mnuiParamSelect
into Select the parametres...
for English, Vyber parametry...
for cs_CZ
, etc).
It seems that this is not usual approach considering gettext
. I am very new to gettext
. Should I be aware of any problem related to the symbolic language identifications approach?
Thanks for your time and experience,
Petr
As far as I can see, the first big problem is that creating new translations will be difficult (or at least time consuming), as the translator will only see the symbolic id, and needs to find the corresponding English message in a different file.
Second problem: If you are using printf-style formatting like "%d files", gettext (i.e. msgfmt) won't do any syntax checking for you if the symbolic ids do not contain those format specifiers. So if your translator adds one "%d" too many for example, the application will probably crash when used with that translation.