I have a handler that shows user a message (this is called by jquery load() ) .
This is a multi-languages website .
On page load I’m setting Page.UICulture based on lang query string. And all language dependent contents are saved in global resources.
Now when I call handler, in that handler I’m using Resources.ResourceName.KeyName to get proper message. But it’s not working. It just reads from default resource.
You should be setting
Thread.CurrentThread.CurrentUICulture. The documentation forPage.UICulturewhich you are using states this:And you should do so inside
InitializeCulture, as per “To set the culture and UI culture for an ASP.NET Web page programmatically” on this MSDN page, which also provides an example.