Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » How to update the GUI with language changes?
Re: How to update the GUI with language changes? [message #38474 is a reply to message #38469] |
Wed, 19 December 2012 18:41 |
|
lectus wrote on Wed, 19 December 2012 15:15 | But if I want the user to select a different language after the Window is already created, how to update the Window to reflect the changes?
| Hi lectus,
You have to reinitialize the GUI somehow, there is more possible way. In simple apps I sometimes just serialize complete state, close the window and create new one by loading the serialized values again with new language settings. It happens so fast user will only see it blink a little. Works just fine, but requires to write the serialization code.
Another option is to do initialization of all widgets that contain internationalized strings into separate function, that is CtrlLayout, all the SetLabel calls, column names, tab names etc. This separate function is then called from constructor and also after language change. This way is IMHO quite natural and doesn't require much more work.
Best regards,
Honza
|
|
|
Goto Forum:
Current Time: Wed Apr 24 11:07:14 CEST 2024
Total time taken to generate the page: 0.01949 seconds
|