Tedmond wrote:
Dear all,
My application allows users to switch languages at run time. I use the
following code to change the UI Culture but all controls are remaining
unchanged.
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
Why? Anything that I need to do in order to refresh the controls?
Thanks for any help!
Tedmond
Change "CurrentUICulture" will not automatically take effect in all UI
control.
Change "CurrentUICulture" just affect some APIs which are releated to
localization.
For example, "System.Resources.ResourceManager.GetString(.. .)", then it
will use the current "CurrentUICulture" to load suitable string resources.
For Windows.Form UI control, you need to reload all the resource strings
after change the "CurrentUICulture".
--
Jacky Kwok
jacky@alumni_DOT_cuhk_DOT_edu_DOT_hk
jacky@compose_DOT_com_DOT_hk