[Interest] get english translation
Bo Thorsen
bo at vikingsoft.eu
Tue Sep 2 07:25:34 CEST 2014
Den 01-09-2014 14:50, Graham Labdon skrev:
> Hi
> My application is internationalized, however, in some circumstances I need the English version of the string no matter what translator is being used.
> Anyone have any suggestions on how to achieve this?
Make a local tr() in the classes where this is needed? lupdate and
friends would never know it's not the right one you call and you can set
a local switch in there.
I considered something like maybeTr() and do a list of all translated
strings with tr() inside it. But then you loose the context of the
string in linguist. Subclassing QTranslator or my idea above sounds like
the two most interesting options. If you go with a version that sets a
bool, be careful to make your code exception safe.
Bo.
--
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu
More information about the Interest
mailing list