UICULTURE Thread context

  • Thread starter Thread starter sfear
  • Start date Start date
S

sfear

Hi all,
I'm trying to create a multilanguage website in ASP .NET 2.

I want to let users to set their preffered language. Using a listbox
and the Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(selectedLanguage);
postbacking the page the controls are loaded in the selected language;
but loading a new page, for instance clicking on a hyperlink, the
language change.

Why? i don't have setted the language in the browser either in the
web.config.

Between 2 pages the thread changes?

please help.

thanks
Fabrizio
 
thanks..
Yes, most probably. Sometimes even one page can be server by 2 different
threads..

but, when i print on screen the thread ID it is always 1.. on
different load of the same page either in load of different pages, but
maybe that doesn't mean anything.

Check here for the correct ways to manipulate UICulture:http://msdn2.microsoft.com/en-us/library/bz9tc508.aspx

the problem persists. I have implemented that, but between two pages
the language doesn't remain the one selected in the listbox.

So... which is the way to implement something that permit users to
select a language and to use it in all pages of the website?
I thought using a parameter in user's profile.. and setting the
'currentthread.uiculture' at each page load, is it correct?
are there better ways?


thanks again
Fabrizio
 
Back
Top