Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2007

Tip: Looking for answers? Try searching our database.

UICULTURE Thread context

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sfear - 24 Sep 2007 10:34 GMT
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
Laura T. - 24 Sep 2007 10:56 GMT
> Between 2 pages the thread changes?
Yes, most probably. Sometimes even one page can be server by 2 different
threads..

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

> Hi all,
> I'm trying to create a multilanguage website in ASP .NET 2.
[quoted text clipped - 13 lines]
> thanks
> Fabrizio
sfear - 24 Sep 2007 11:29 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.