Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1778
Registered: August 2008
Location: Czech Republic
Senior Contributor

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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Brazilian Portuguese (PT-BR) translation
Next Topic: compiler's output message of vc10free Chinese edition
Goto Forum:
  


Current Time: Tue Sep 29 12:17:47 CEST 2020

Total time taken to generate the page: 0.01549 seconds