views:

87

answers:

1

I've implemented an ASP.NET web application that supports 5 different languages.

The web application has 5 .resx files that contain the resources required in order to display the website in the languages it supports. To display the site in the language that the user has selected, I've been setting the Thread.CurrentThread.CurrentUICulture and Thread.CurrentThread.CurrentUICulture in the InitializeCulture page event.

Some of the pages have UpdatePanels wrapped around the content.

From what I remember (from 3 years ago when I was researching globalization), in order to change cultures you have to do a full page update.

So here's the problem:

The user opens a tab and starts working on some page that has an UpdatePanel surrounding the content.

Then the user opens another tab and selects a new language.

The user returns to the original tab and causes a postback to the server...at this point the page never returns control to the user.

How do I get around this problem?

Thanks,

-Frinny

A: 

To get around this problem I ended up storing the user's cultural settings into a HiddenField for each page (did this in the MasterPage really). This way I can access the user's original culture/language settings in the Page InitializeCulture event. The user would have to click enter on the URL or exit the page to use the "default" language/culture selected in the other tab.

Frinavale