Community-Credit.com | NonProfitWays.com | SOAPitstop.com   Skin:   
      User: Not logged in 
Home
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Presentations
Featured Articles
Book Chapters
Training Courses
Events
NewsGroups
 
Discussions
Examples
Tutorials
Tools
Articles
Resources
Websites
 
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
Logout
 
About Me
My Blog
HeadGeek Articles
Talking Portfolio
Resume
Pictures
World Trip Pics

Globalisation in Asp.Net
Author: Rajendra Kumar
Published: 6/28/2006 5:12 AM
Category: ASP.NET
Summary: This Article explains about Globalization concept in Asp.net

 

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

 

 

   <globalization

            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

 

 <code>

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

</code>

 

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

 

This article Explains about Globalisation in Asp.net

 

 

 

 

 

 


 

 
Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”



Advertise on XMLPitstop

Advertise on XMLPitstop


EggHead Cafe
Web Servicee development
DotNetSlackers
Buy text ads here!
remote data storage
Color Laser Printer
Fendi sunglasses
Skype vs. sipcall
VoIP Internettelefonie
Buy text ads here!

Interested in Text ads?
2,223 Total Members
36 members(last 30 days)
8 members(last 7 days)
2 members(today)

1,609 Total Discussions
12 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

17,260 Total Blog Posts
1,839 Blogs(last 30 days)
342 Blogs(last 7 days)
49 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,786 Total Resources
5 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


 

David Silverlight's XMLPitstop.com| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139