Total members 11893 |It is currently Tue Nov 05, 2024 7:37 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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






Author:
Newbie
User avatar Posts: 2
Have thanks: 0 time

I was registered at your forum. I have printed the test message. Do not delete, please.
:clapping:


Author:
Newbie
User avatar Posts: 1
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.


Author:
Newbie
User avatar Posts: 1
Have thanks: 0 time
Post new topic Reply to topic  [ 3 posts ] 

  Related Posts  to : Cant change the culture or UICulture of the content page
 Move content to center of the page     -  
 Change and get html content of element     -  
 Change the content of select tag using JQuery     -  
 change the direction of text in your page     -  
 Image Scroller-scrollbar-LINE_UP,LINE_DOWN-PAGE-UP-PAGE-DOWN     -  
 Hide the content of the div     -  
 show the content of set     -  
 Web content & Website Design     -  
 check folder content using asp     -  
 lowercase table content     -  









Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com