void Application_PreRequestHandlerExecute(object sender, EventArgs e) { // set up the thread's culture before the handler executes System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("he-IL"); System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("he-IL"); } protected void Application_BeginRequest(object sender, EventArgs e) { System.Threading.Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo("he-IL"); System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("he-IL"); } form the Page contant- UICulture: Hebrew (Israel) ../Testing/Iso_Dos.aspx ../Testing/Iso_Logical.aspx ../Testing/Iso_Visual.aspx ../Testing/CodePage.aspx
pretygirl
Question subject: Re: Cant change the culture or UICulture of the content page
Posted: Mon Aug 10, 2009 2:51 am
Joined: Mon Aug 10, 2009 2:50 am Posts: 1 Has thanked: 0 time Have thanks: 0 time
I was registered at your forum. I have printed the test message. Do not delete, please.
haffila
Question subject: Re: Cant change the culture or UICulture of the content page
Posted: Tue Aug 11, 2009 9:28 am
Joined: Tue Aug 11, 2009 9:25 am Posts: 3 Has thanked: 0 time Have thanks: 0 time
Sometimes you have to change the culture settings of a user control in runtime. Let's say we have to change the language of a login form on user click. Let's say we do not want to and cannot change the culture of the page (e.g. the user control is embedded in a SharePoint page). The first step is to create a Local Resource for the user control (.resx). Now it's possible to change the language dynamically.