[Qt-interest] Language change

R. Reucher rene.reucher at batcom-it.net
Mon Nov 2 16:20:03 CET 2009


On Mon, 02 Nov 2009 15:05:14 +0000, Anatoly Burakov wrote:
> I can't seem to find a way to translate my app on the fly - i have set
> up everything (e.g. retranslateui everywhere etc.) but i can't seem to
> find a way to actually make QT use the translation files i provide. i
> mean they load fine if i hard-code the locale or use system-one, but i
> can't change it on the fly. The QT help says everything about handling
> the LanguageChange event, but says nothing about how to make that event
> actually happen.
Well, the docs say how to make this happen, but IMHO it's not really a 
practicable solution for large projects:
http://qt.nokia.com/doc/4.5/i18n.html#dynamic-translation

My trivial "solution" is to NOT allow on-the-fly language changes... that 
is, since I use Qt 4. I remember this worked fine at the times I used Qt 
3.

> Also, just as a side question - can i make Linguist ignore some of the
> strings in my ui files? Like, i have two labels and i don't need QT to
> change whatever they contain (their contents change programmatically).
I'm not aware of a way to make it ignore texts (in UIs), but if you don't 
want to translate these texts from the UI file, just leave them empty (in 
Designer)!

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/



More information about the Qt-interest-old mailing list