Skip to main content

Posts

Showing posts with the label Culture

Globalization and Localization with ASP.NET

Configuring Globalization and Localization ASP.Net provides infrastructure to automatically adjust the appearance and formatting based on the client’s browser’s culture settings. Using Resource Files:           Visual studio automatically generates the XML resource file for the controls on the page that can even used by non-technical people to create other versions in different languages. There are two types of resource files global and local . Local Resources: Local resources are specific to pages stored in App_LocalResources folder in that same folder of page. Local resource file names are named as <PageNumber>[.languages].resx The Term Culture refers to regional difference in dates, currency. It’s automatically handled by ASP.NET. <PageName>.resx: Default to use when no other resource file available. <PageName>.de.resx: German. <PageName>.es.resx: Spanish. <PageName>.e...

Creating a Custom Culture using .NET

Namespace: System.Globalization CultureAndRegionInfoBuilder class provides the facility to create new and customize existing cultures. To install a custom culture one must have administrative privileges . One must Add Reference of sysglobal.dll in order to create objects of CultureAndRegionInfoBuilder . CultureAndRegionInfoBuilder vCulture = new CultureAndRegionInfoBuilder(“en-US”, CultureAndRegionModifiers.Neutral); OR CultureInfo vCultureInfo = new CultureInfo(“en-US”); RegionInfo vRegionInfo = new RegionInfo(“US”); CultureAndRegionInfoBuilder vNewCulture = new CultureAndREgionInfoBuilder( “en-MS”, CultureAndRegionModifiers.Neutral); vNewCulture.Load(vCultureInfo); vNewCulture.Load(vRegionInfo); CultureAndRegionModifiers Enumeration: Class Description Neutral A neutral custom culture. None A specific, supplemental custom culture. Replacement A custom culture that replaces an existing ...