What is Globalization and Localization in ASP.NET?
Localization is the process of adapting a software application for a specific locale. Globalization is the process of identifying the localizable resources of the application. You can provide support for Localization and Globalization to the application using System.Globalization, System.Resources and System.Threading namespaces.
The developer can define culture specific information using the System.Globalization namespace. The System.Resources namespace contains ResourceManager class that allows access to resources either from the main assembly or from the Satellite Assemblies. The System.Threading namespace supports for multithreaded programming.
A web form has two culture values, Culture and UICulture. Culture value is used for date and number formatting and UICulture values are used to determine culture specific resources.
You can set culture and UICulture values in the application as follows.
Using element of Web.Config.
Using @Page directive in the Page.
In Code-Behind Page e.g.
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture ("en-GB");
Thread.CurrentThread.CurrentUICulture=new CultureInfo("en-GB");
The developer can define culture specific information using the System.Globalization namespace. The System.Resources namespace contains ResourceManager class that allows access to resources either from the main assembly or from the Satellite Assemblies. The System.Threading namespace supports for multithreaded programming.
A web form has two culture values, Culture and UICulture. Culture value is used for date and number formatting and UICulture values are used to determine culture specific resources.
You can set culture and UICulture values in the application as follows.
Using
Using @Page directive in the Page.
In Code-Behind Page e.g.
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture ("en-GB");
Thread.CurrentThread.CurrentUICulture=new CultureInfo("en-GB");
What are the Globalization approaches possible in ASP.NET?
You can follow many approaches to have globalized application.
You can create separate web application for each culture.
You can create an application that can detect the user’s culture and adjusts output at run time using format specifiers and other tools.
You can store culture-dependent strings in resource files that are compiled into satellite assemblies.
You can create separate web application for each culture.
You can create an application that can detect the user’s culture and adjusts output at run time using format specifiers and other tools.
You can store culture-dependent strings in resource files that are compiled into satellite assemblies.

0 Comments:
Post a Comment