| Globalization, Localization and Personalization » |
In the old days, we have to have separate applications built to support different languages and countries. And lots of them are still running today. That incurs much higher maintenance costs and inflexibility. To solve that issue, the idea is to run one web application, i.e., one code base, while the web interface can adapt to user's cultural settings.
ASP.NET has the built-in capability to address localization. Basically a web application has different set of resources to support different cultures. And it can select/render the contents with the right set of resources based on a user's culture.
ASP.NET 2.0 offers two mechanisms on selecting the right resources. One is called implicit localization, where an appropriate set of resources is automatically selected based on a user's language preferences contained within browser settings. All you need to do is make available the resources for each language/country and set the Culture="auto" and UICulture="auto" attributes in the Page directive. The other is explicit localization, where you can explicitly set the culture of a web application. To do that, you need to set the CurrentCulture and CurrentUICulture properties of the current thread in the Page_PreInit event. You may look at a short introduction on ASP.NET 2.0 localization at: http://www.ondotnet.com/pub/a/dotnet/2005/08/08/localizingaspnet20.html?page=1