A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, February 7, 2008

DEVELOPING WEBSITES TO SUPPORT MULTIPLE LANGUAGES

 

ASP.Net contains namespaces like System.Globalization,culture info class,Resoursemanager,resoursefiles to support multi lingual applications.

We store the content in xml files,resourse files(also xml),database.

We need to create base resourse file and language specific resourse files.

When the application is compiled, the resource files are embedded into assemblies ,the default resource file is embedded in the main assembly (.dll file), language specific resource files are embedded into their own assemblies called satellite assemblies. Resouse file looks like key(name)/value pairs ,the name is the same for all resource files, and the value is a language specific translation of same content.

The resource manager will automatically load the right resource file based on the current thread's CurrentCulture value .The ResourceManager class automatically retrieves the content from the right XML file based on the thread's CurrentCulture value .

Three functions we mainly use

  1. The public method GetString which is used throughout the application to access the required resource

  2. The private method GetResource which gets a Hashtable either from the cache or by calling LoadResource

  3. The private method LoadResource which parses the XML file and stores it into the cache


No comments:

Post a Comment

Post your comments here:

Dotnet-Interviews