how change language at runtime?
I have a translation problem in my application.
In the main i'm setting the language in this way:
Code:
translator.load ( "/home/mattia/workspace/myProject/translations/trm_it" );
app.installTranslator ( &translator );
......
If i want to set as default language "en" i have to do:
Code:
translator.load ( "/home/mattia/workspace/myProject/translations/trm_en" );
and it is correctly loaded, when i'm at runtime i want to change the language and i made a dialog widget to allow the user to insert a language, for example "en", but i don't know how performe the change language at runtime.
Is it possible do it?
Thanks
Re: how change language at runtime?
Re: how change language at runtime?
In addition to that, if you want to retranslate a window which is already created (and probably visible), you need to intercept the QEvent::LanguageChange event and retranslate all texts. If you have a Designer created ui, it's enough to call retranslateUi() from the form object.
Re: how change language at runtime?