C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Globalization of Asp.net Application


Posted Date: 15 May 2006    Resource Type: Articles    Category: Web Applications
Author: Rajendra kumar YerraMember Level: Gold    
Rating: Points: 7



Introduction


Some Times our application need to provide comfortable in different languages for different users of different countries and different Geographical regions. A truly international web application should be authored in a way that all users, from different geographical regions, can work with the same level of comfort and see content that they can comprehend.How we can we do that ,We can do that by Culture using Globalization in Asp.net.

What is Globalization?


Globalization is the process of designing and developing a software product that function for multiple cultures with little modifications.

Asp.Net localization is managed by the System.Globalization namespace. The globalization functions work with the culture encoding properties of the browser request. We can set the culture encoding in number of ways

1. Web.Config


You can set the default culture encoding for an entire web application in the configuration file (web. config). This is useful if you know the entire Application needs a specified encoding type. See the following example in System.Web of Configuration section in Web.Config file


requestEncoding="utf-8"
responseEncoding="utf-8"
fileencoding=" utf-8"
culture="en-US"
uiculture="en" />



2. Page-Level


Culture encoding can also be set at the page level in the @ Page directive
For example see the following example


<@ Page Culture="en-US" UICulture="en" ResponseEncoding="utf-8">


3. Programatically


The culture encoding can also be set programmatically. This requires the use of both the System.Globalization.CultureInfo class and the System.Threading.Thread class. The CultureInfo class is used to specify the culture settings, and the Thread class is used to apply the new culture settings to the current thread
For example see the foolowing sample code

CultureInfo objCI = new CultureInfo ( RadioButtonList1 .SelectedValue .ToString ()) ;
Thread.CurrentThread.CurrentCulture = objCI;
Thread.CurrentThread.CurrentUICulture = objCI;
ResourceManager rm = ResourceManager .CreateFileBasedResourceManager ("resource", Server.MapPath("resources") + Path.DirectorySeparatorChar, null);
Response.Write( rm.GetString("Test"));



Globalization involves two processes

1. Internationalizing the application code
2. Localizing the application to other languages and cultures

Internationalization:



The internationalization process includes steps to translate, store, retrieve, and present application content for any locale, using the same application code base.
A locale is a combination of both language and cultural environments, including the format of dates, times, currencies, telephone numbers, and so on.
The internationalization process of globalization enables to you to remove all content from the presentation layer and from the code base. Only a single code base and a single presentation layout will present content for any culture. This process also enables you to place the content in a location that can be easily translated and that will be programmatically accessible to populate the presentation layer. In addition, the internationalization process allows storing content and user input in a format that can be presented with integrity for the appropriate culture. The internationalization of the application makes the application ready for localization.

Localization


The localization process of globalization enables your application to adapt to other locales by translating and formatting content according to culture, without any change in the code. This process also enables removal of any bugs introduced by internationalization, such as accidentally translated file or field names

Globalization Namespaces


In addition to System.Globalization namespace there are two more namespaces which are used in the part of Globalization they are System.Resources and System.Threading.

System.Globalization


The System.Globalization namespace contains classes that define culture-related information which includes language, country or region, calendars, the date format, currency, numbers, and the sort order for strings. These classes are useful for writing globalized (internationalized) applications. Classes like StringInfo and TextInfo provide advanced globalization functionalities, such as surrogate support and text element processing.

System.Resources


The System.Resources namespace contains classes and interfaces that allow developers to create, store, and manage various culture-specific resources used in an application.

System.Threading


The System.Threading namespace contains classes and interfaces that enable multithreaded programming. The classes of this namespace enable synchronization of thread activities and access to data.

Summary


In This Article we learned what is Globalization?





Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Performance Improvement For AJAX
Previous Resource: Convert Recordset to array
Return to Discussion Resource Index
Post New Resource
Category: Web Applications


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use