Hi, I want to change the language in my website. I thought i could do it using a Handler, so the drop down would go for http://domain.com/Handler.ashx?language=en-US, f.i.
So, it calls the handler, that has this code:
string selectedLanguage = context.Request.QueryString["language"];
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedLanguage);
context.Response.ContentType = "text/plain";
context.Response.Write("Hello World");
context.Response.Redirect(context.Request.UrlReferrer.AbsoluteUri.ToString());
But when it goes back, Thread.CurrentThread.CurrentCulture is set to pt-BR, which was the initial value.
My question is: the Thread on the Handler is different than the aspx page that loads the content? And what would you suggest as a work around?
Thank you