Article, Dot Net Development
In present day’s tough competition, every business is looking to reach out to the maximum audience possible and for this a multilingual web application can be a good thing to go. Multilingual web based applications can be developed easily with ASP.NET technology and can further provide a business a better way to reach out to the global marketplace for products and services promotion and sales. ASP.NET application development to support multiple languages is rather an affordable way to take your business to the international level than implementing other costlier strategies for business promotion across the globe. Hence, many businesses today are opting to develop multilingual web applications in ASP.NET. A few important things required to do this are as follows.
Selecting an Appropriate Method:
There are different methods to develop multilingual web applications with ASP.NET.
– Developing web application separately for every language desired.
– Using database tables to store the content related to all the different languages.
– Using resource files to store the content in various languages. Here the resource files contain the non-executable data that is required by and deployed by the application. As compared to fetching data from database this will give better performance.
Understanding Few Basic Concepts:
Before going deep into development essentials, it’s important to understand few basic concepts like:
Globalization is the process of separating the parts of the application that are different in different languages and separating them form the core content.
Localization is the process of the application creation or configuration of an application for a specific language.
Culture is the combination of the language spoken and region to which the language belongs to. For example say en-US, it means English language spoken in US.
Namespace is possibly a set of classes that .NET provides to work with culture information. For example, as the culture is set at thread level one will require working with Thread class from System.Threading namespace.
Setting Culture and UI Culture for Windows Forms:
If you wish to override the user or OS settings, you require setting the CurrentCulture and CurrentUICulture Properties explicitly in your app. By default, the CurrentCulture value will be system’s User Locale that is defined already in regional options in control panel of the user system. On other hand, the CurrentUICulture value will be set to language of your system’s user interface. You must specify a Culture before the InitializeComponent() method is called. By doing like this, every part of the application’s user interface will be inclined to that culture.
Setting the Culture and UI Culture for Web Forms:
There are basically two culture values in Web Forms page – Culture and UICulture. The basic purpose of UICulture is to control the loading of resources for the form and to indicate the language which resources should load while culture value determines other things like data and number formatting and much more.
One can easily create .resx files using VS.NET. Here just follow the below mentioned process.
Add > New Item > Resource File from the menu and enter keys and values in the resource editor.
Compiling these resource files is easy. Just use ResGen followed by space and followed again by the resource file name.
Compiling Resources in Satellite Assembly:
Satellite Assembly is a compiled DLL which contains resource data and can be created with the help of AL utility provided with .NET SDK or using VS.NET.
To compile the resource file in satellite assembly following steps are to be followed:
– Creating and compiling a resource file .
– Creating satellite assembly (.dll) and creating folder to store it.
– Placing the corresponding satellite assembly in the folder.
– Accessing the resources inside the application.
In order to support multilingual capabilities, the system should have Windows 2000 or XP or higher versions because these versions are UNICODE enabled.
Set Up Language Settings
You need to set up the relevant language settings for the operating system in order to support multilingual capabilities for an application.
In control panel, you may find Regional Options and General tab. Go there and select the preferred languages you wish your system to support.
The above mentioned are the basic and important things considered for development of ASP.NET applications supporting multiple languages. For those looking for multilingual application development services in ASP.NET can approach Brainvire Infotech for quality and affordable solutions.