Total members 9952 | Gratitudes |It is currently Sat Feb 11, 2012 3:16 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 3 posts ] 
Author Question
 Question subject: Cant change the culture or UICulture of the content page
PostPosted: Tue Jan 27, 2009 11:25 am 
Offline
Newbie
User avatar

Joined: Tue Jan 27, 2009 11:14 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time

hello

Cant change the culture or UICulture of the content page of master page,

Any language that its not English

thanks

Code:


on the contant page - (not on the master)

protected override void InitializeCulture()
{
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("he-IL");
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("he-IL");

base.InitializeCulture();
}



on the master Page
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
meta http-equiv="Content-Language" content="he" />

on web config

globalization requestEncoding="utf-8" responseEncoding="utf-8" uiCulture="he-IL" culture="he-IL" />

Global.asax

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



TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Cant change the culture or UICulture of the content page
PostPosted: Mon Aug 10, 2009 2:51 am 
Offline
Newbie
User avatar

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.
:clapping:


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Cant change the culture or UICulture of the content page
PostPosted: Tue Aug 11, 2009 9:28 am 
Offline
Newbie
User avatar

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.


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 3 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Need to Display Content using JavaScript in HTML page  Scripting Language  stankov  0
 change Font of text in java  Java examples  msi_333  1
 Change the properties of div tag  HTML examples  msi_333  0
 change the direction of text in your page  HTML examples  msi_333  0
 how to change the alignment text in html  HTML examples  msi_333  0

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team