Implementing Multilingual Applications in Microsoft .NET
page 8 of 12
by Joydip Kanjilal
Feedback
Average Rating: 
Views (Total / Last 10 Days): 53115/ 106

Implementing Multilingual Applications

A Multilingual application is one that provides support for multiple languages.  This section discusses how we can implement a multilingual application in .NET using the concepts explained earlier.  The steps for implementing a multilingual application in .NET can be summarized as the following.

·         Create a resource file for each locale.

·         Save the resource files with a .resx extension.

·         Compile the resource files using resgen utility of .NET SDK to create a compiled binary resource file.

·         Create satellite assembly using al utility of .NET SDK.

·         Create folders for storing the satellite assembly and store the satellite assembly there.

·         Read resources from the satellite assembly in the application's source code.

First, we have to create culture specific resources in resource files.  Then we can store the culture specific data in the resource file and save the same with a .resx extension.  Note that the culture name should be provided in the resource file name to follow the resource file naming convention.  We can use Visual Studio .NET to create a resource for a particular culture.  Resource files have been explained in more detail earlier.  Let us assume that a file Internationalization.en-GB.resx be created for en-GB culture and compiled (as shown in listing 4) to create the Internationalization.en-GB.resources file.  This file is the complied resources file.  This compiled resource file can be used to create a satellite assembly.  This satellite assembly can then be used by the application.  Refer to code listing 9.  The file Internationalization.resources.dll is a satellite assembly.  This satellite assembly should now be placed in a sub folder inside the application's main folder and the name of this sub folder should be the same as the name of the culture that the satellite assembly is targeted for.  This satellite assembly can now be used to display locale specific information in the application.


View Entire Article

User Comments

Title: What about localized Databases?   
Name: Rojalin
Date: 2006-09-28 6:54:50 AM
Comment:
many many tx for this article
Title: Implementing Multilingual Applications in Microsoft .NET   
Name: rambabu
Date: 2006-09-12 7:22:14 AM
Comment:
The article is very nice and the author explained in simple terms to understand the various aspects of Globailization and Localization.I liked this article very much.
Title: What about localized Databases?   
Name: Max
Date: 2006-09-12 4:58:25 AM
Comment:
Hi,
thank you very much for your article!
I have always been looking around for a standardized way of localizing db-entries. For instance if I run a web-shop which must be available to german and english customers my descriptions of my articles must be in german and english.
Of course this has to be stored in a DB and not in embedded resources.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-23 2:52:13 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search