User-2021386652 posted
In order to set localization. I set Thread.CurrentThread.CurrentCulture in httpmodule
private
void
Application_BeginRequest(object
sender, EventArgs
e)
{
System.Threading.
Thread.CurrentThread.CurrentCulture
= new
System.Globalization.CultureInfo("zh-CN"
);
System.Threading.
Thread.CurrentThread.CurrentUICulture
= new
System.Globalization.CultureInfo("zh-CN"
);
}
but, in aspx page, the page_load event still get the value "en-US" by Thread.CurrentThread.CurrentCulture
Response.Write(System.Threading.
Thread
.CurrentThread.CurrentUICulture.Name);
Response.Write(System.Threading.
Thread
.CurrentThread.CurrentCulture.Name);
what I expect is that the page_load can get "zh-CN" by Thread.CurrentThread.CurrentCulture
Thanks,
Joey