The concept:
The process of making application ready for multi-lingual support is called Internationalization of the application. It includes following three steps:
ASP.NET enables you to create a page that can obtain content and other data based either
Resource files:
Resource files is an XML that contains the string that has to be translated in different languages or paths to images. The resource file contains key/value pairs. Each pair is an individual resource.
Separate resource file has be created either
When you create resource files, you start by creating a base .resx file. For each language that you want to support, create a new file that has the same file name. But in the name, include the language or the language and culture (culture name). For example:
Generating resource files:
Resource files in ASP.net are created on the basis of scope required.
Using resource files in Pages:
To use the resource files in the web pages, there are two ways:
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx
http://www.beansoftware.com/ASP.NET-Tutorials/Globalization-Localization.aspx
http://www.codeproject.com/Kb/aspnet/localizationByVivekTakur.aspx
http://www.hanselman.com/blog/GlobalizationInternationalizationAndLocalizationInASPNETMVC3JavaScriptAndJQueryPart1.aspx
The process of making application ready for multi-lingual support is called Internationalization of the application. It includes following three steps:
- Globalization is the process of designing and developing applications that function for multiple cultures. Thus globalization is a concept which underlines the fact that the application needs to be neutral culture and nothing related to culture is hard coded. The primary task in this phase is to identify the various locale-sensitive resources and to isolate these resources from the executable code. Following are key points to make your application globalized:
- Do not hard code cultures like date, currency etc.
- Do not hard code texts, put it in resource files.
- Localizability: An application that has been globalized must be tested to ensure that its executable code is independent of the culture and language-specific data. This is called localizability testing. The focus of localizability testing is to check how the application adapts itself to different locales
- Localization is the process of customizing your application for a given culture and locale. Localization consists primarily of translating the user interface.
ASP.NET enables you to create a page that can obtain content and other data based either
- On the preferred language setting for the browser or
- Based on the user's explicit choice of language.
Resource files:
Resource files is an XML that contains the string that has to be translated in different languages or paths to images. The resource file contains key/value pairs. Each pair is an individual resource.
Separate resource file has be created either
- For each language (hindi & english)
- For each language and culture (UK English, US English)
When you create resource files, you start by creating a base .resx file. For each language that you want to support, create a new file that has the same file name. But in the name, include the language or the language and culture (culture name). For example:
- WebResources.resx - The base resource file. This is the default (fallback) resource file.
- WebResources.en.resx - A resource file for English. This is also called neutral culture file.
- WebResources.en-GB.resx - A resource file for english (UK) specifically.
Generating resource files:
Resource files in ASP.net are created on the basis of scope required.
- Global resource file - To create global resource file, we have to put resource file in the App_GlobalResources folder at the root of the application. One can read these file from any page or code of the application.
- Local resource file - To create local resource file, we may either put files in the reserved folder App_LocalResources or any other folder in the application. You associate a set of resources files with a specific Web page by using the name of the resource file. For example, if there is a file name called index.aspx, :
- Index.resx - The base resource file. This is the default (fallback) resource file.
- Index.en.resx - A resource file for English. This is also called neutral culture file.
- Index.en-GB.resx - A resource file for english (UK) specifically.
Using resource files in Pages:
To use the resource files in the web pages, there are two ways:
- Implicit localization - it works with local resources and lets you automatically set control properties to matching resources.
- Explicit localization - it lets you use a resource expression to set a control property to a specific resource in a local or global resource file.
http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx
http://www.beansoftware.com/ASP.NET-Tutorials/Globalization-Localization.aspx
http://www.codeproject.com/Kb/aspnet/localizationByVivekTakur.aspx
http://www.hanselman.com/blog/GlobalizationInternationalizationAndLocalizationInASPNETMVC3JavaScriptAndJQueryPart1.aspx
1 comment:
fdbfd
Post a Comment