[Qt-interest] Query related to Internationalization in loading .qm file at runtime
Oswald Buddenhagen
oswald.buddenhagen at trolltech.com
Fri Jan 30 16:33:02 CET 2009
On Fri, Jan 30, 2009 at 05:51:03PM +0530, Hemalatha Venkataswamy wrote:
> When I select desired language from the combo box, my code will
> actually load the .qm file on change of the combo box based on the
> language selected. The language is not affected immediately to the
> widgets. I need to close my application and open the application to
> see the application loaded with a new language.
>
if you use QUiLoader, qt 4.5 (yes, only snapshots for now) will
auto-update the ui if you use QUiLoader::setLanguageChangeEnabled().
if you use compiled .ui files, you need to catch the LanguageChange
event sent to every qobject and call retranslateUi() on all the
instances of uic-generated classes. if you are using hand-made ui, you
need to do everything by hand ...
More information about the Qt-interest-old
mailing list