.Net Framework, Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML

Ado.netAsp.Net 2.0SQLC-SharpXMLFrameworkIISXMLWebServiceArchitecture
UMLProject ManagementSDLCMethodologiesDesign PatterenOOPWCF.Net RemotingWWF
MVPMVCSilver LightN-HibernateAjaxJ-QuerySEO-MarketingSite MapPhp

Globalization in Asp.net

Globalization in .netCulture in .netLocalization in .net
Resource file in .net


What is globalization ?
In Globalization, an application is developed to support various languages and cultures. Globalization is the process of making an application that supports multiple cultures without mixing up the business logic and the culture related information of that application.

How to implement globalization in .net application?
in code behind you require
using System.Globalization;
using System.Threading;


Add => Add Asp.Net Folder => App_GlobalResources
Add => Add Asp.Net Folder => App_LocalResources

Now add resouce file in App_GlobalResources folder as per your need
MyResource.en-GB.resx
MyResource.en-US.resx
MyResource.fr-FR.resx
MyResource.hi-IN.resx


Now take a asp:Label and set the text property Text="$ Resources:MyResource, WelcomeText"
Finally initialize the culture
protected override void InitializeCulture()
{
string _language = Request.QueryString["language"];
if (!string.IsNullOrEmpty(_language))
{
Thread.CurrentThread.CurrentUICulture = new CultureInfo(_language);
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(_language);
}
base.InitializeCulture();
}

Now you are done ! just click the hindi link to see the changes
Hindi || French
Welcome Message :
Bienvenue à mysite
Leave your comment.
Name
Email
Comments
Tell Us4071+5 =

Reduce your Dialy IT Cost, Consult with us
Stay healthy in recession

Advertisement
Sponsored by

Privacy Policy ©2009 ETG Consultancy, All Rights Reserved Terms & Conditions
Asp.net, Ado.net, .Net Remoting, .Net Webservice, SQL, XML, XSLT, WCF, WPF, WWF NHibernate, Ajax, Jquery, DHTML