G
Guest
Hi everybody,
I want to add localization support into my windows forms application.
Basically, I create a menu item where users can choose a language of their
choice. When users choose their preferred language, I want to update all the
texts/labels on the current form UI to the new culture, instantaneously.
For this, I have created a .resx file for each supported culture and in the
event handlers for menu item's Click event, I change the CurrentUICulture
property to the corresponding culture as follow:
System.Threading.Thread.CurrentThread.CurrentUICulture = new
System.Globalization.CultureInfo("en-US");
However, when the program runs, nothing happens. So, I guess I must somehow
force the form to reload itself. I've tried all the methods like
Form.Update(), Form.Refresh(), Form.Invalidate(), ... but unsuccessful so
far.
Does anybody know the solution to this scenario ?
Thanks a lot
SuperKinhLuan
I want to add localization support into my windows forms application.
Basically, I create a menu item where users can choose a language of their
choice. When users choose their preferred language, I want to update all the
texts/labels on the current form UI to the new culture, instantaneously.
For this, I have created a .resx file for each supported culture and in the
event handlers for menu item's Click event, I change the CurrentUICulture
property to the corresponding culture as follow:
System.Threading.Thread.CurrentThread.CurrentUICulture = new
System.Globalization.CultureInfo("en-US");
However, when the program runs, nothing happens. So, I guess I must somehow
force the form to reload itself. I've tried all the methods like
Form.Update(), Form.Refresh(), Form.Invalidate(), ... but unsuccessful so
far.
Does anybody know the solution to this scenario ?
Thanks a lot
SuperKinhLuan