Go Back   Wiki NewForum > Career Forum (Documents/Tutorials/Advice) > Tech Forum & Tutorial > ASP.NET Forum & Tutorial

Reply
Views: 1301 Source: CNN18.com, India-Forums, TellyChakkar, India, Times of India, Youtube, BollywoodLife, Rediff  
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1  
Old 05-31-2009, 04:43 AM
bholus7 bholus7 is offline
Banned
 
Join Date:
Apr 2009
Posts: 1,322
Default ASP.NET Globalization and Localization - Interview Questions

ASP.NET Globalization and Localization - Interview Questions


Question - What is Globalization and Localization in ASP.NET?

Answer - Localization is the process of adapting a software application for a specific locale. Globalization is the process of identifying the localizable resources of the application.



You can provide support for Localization and Globalization to the application using System.Globalization, System.Resources and System.Threading namespaces.


The developer can define culture specific information using the System.Globalization namespace. The System.Resources namespace contains ResourceManager class that allows access to resources either from the main assembly or from the Satellite Assemblies.


The System.Threading namespace supports for multithreaded programming.


A web form has two culture values, Culture and UICulture. Culture value is used for date and number formatting and UICulture values are used to determine culture specific resources.
You can set culture and UICulture values in the application as follows.

Using element of Web.Config.

Using @Page directive in the Page.

In Code-Behind Page e.g.
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture ("en-GB");
Thread.CurrentThread.CurrentUICulture=new CultureInfo("en-GB");



Question - What are the Globalization approaches possible in ASP.NET?

Answer - You can follow many approaches to have globalized application.
You can create separate web application for each culture.

You can create an application that can detect the userís culture and adjusts output at run time using format specifiers and other tools.

You can store culture-dependent strings in resource files that are compiled into satellite assemblies.
Question - Implementing ASP.NET Globalization.

Answer - Create resource files and compile them into a binary resource file.
Create satellite assembly for each of the resource file for each culture.
Store them in separate folders for easy access and replacement.
Read the resources from the satellite assembly that is stored in different folders based on the locale and culture.
Question - Define Resource Files and Satellite Assemblies.

Answer - Resource Files: A resource file contains non-executable data that are used by the application and deployed along with it. Bitmaps, Icons etc are the examples of resource files.


In ASP.NET, resource files are used to make application to support multiple cultures. You can create resource files each of them correspond to specific locale or culture of the application.


You can use resgen utility to compile resource file into an assembly. You can create a satellite assembly from a compiled resource file using the AL utility provided with Microsoft .NET SDK.



Advantages of resource files are as follows.
It supports Globalization features in ASP.NET.

You can have culture based information separate from the content and logic of the application.

You can change resource content without effecting application's code.
Satellite Assemblies

Satellite Assemblies are the special kinds of assemblies that exist as DLL and contain culture-specific resources in a binary format. They store compiled localized application resources.


They can be created using the AL utility and can be deployed even after deployment of the application.

Satellite Assemblies encapsulate resources into binary format and thus make resources lighter and consume lesser space on the disk.

Note: Resource-only assemblies can contain any resource, such as images and text. Satellite assemblies contain only culture-specific resources.

Ads
Reply With Quote
Reply

New topics in ASP.NET Forum & Tutorial

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump


Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
asp web stats