PDA

View Full Version : Dynamic locale change



spanara
14th September 2018, 10:13
Hello There,
I have a requirement to change the locale at run time.
I am aware of following mechanism,
1. Remove the existing translator installed
2. install new translator according to the locale selected
3. Handle the Language change Event

In the language change event, I can set any static text under TR macro and it displays according to the locale selected.

Since I have many widgets in my application,
My question is, if I have a QPushButton with static label. Is it possible to change the label automatically (other than the steps I mentioned above)? OR one has to catch the language change event and once again set the text so that it gets localized?

Thanks
SPanara