![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I am writing a .NET based web application which is localized also. I am using Form Authentication and I use following code to transfer to the next page: FormsAuthentication.RedirectFromLoginPage(email, false); Now on Session Start, I have following code: protected void Session_Start(Object sender, EventArgs e) { // For each session request initialize the culture values with the // user language as specified by url. try { string culture = Request.Params.Get("lang"); if (culture == null) { culture = ConfigurationSettings.AppSettings["DefaultLanguage"]; } try { Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture (culture); Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture); } catch(Exception) { // provide fallback for not supported languages. This is really just a safety catch, //for 'in-case' scenarios Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); } } So my first page shows me the right content based on the language but as soon as they are redirected to the next page after authentication, my culture value is set back to "English US". I really appreciate if you guys can help me. Thanks Poonam |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |