Linguist: how to dynamically switch language of all UI?
Solved
General and Desktop
-
Hi,
It's described in the Internationalisation chapter in Qt's documentation.
-
@SGaist Thanks, but this is not suitable for me.
I had so many ZWgtItem widgets dynamically new from source code.
So it would be awful to do translate like this:changeEvent(){
******
QVector<ZWgtItem*> wgtlist;
//Language change
for(int i=0; i<wgtlist.length(); i++){
if(i==0)
wgtlist[i].setMainTitle(tr("xxxxx"));
else if(i==1)
wgtlist[i].setMainTitle(tr("yyyyy"));
else if(i==2)
wgtlist[i].setMainTitle(tr("zzzzz"));
.................}
}