Internationalize Your ASP.NET Applications (Part 2 of 3) : Page 2
See how to use culture settings to localize images, database content, numbers, currencies, and dates in your ASP.NET applications.
by Ollie Cornes
Oct 21, 2002
Page 2 of 5
The first time a user accesses your site, you want the page to display the most appropriate of the supported cultures automatically. In other words, it's convenient for the Web site to make a smart guess at the default language for a new user. Fortunately, most browsers provide a value in the HTTP request headers that gives you a list of cultures desired by the user, sorted in descending order of importance. In Internet Explorer, users control the list by selecting Tools, Options from the menu and then clicking the Languages button. That displays the Language Preference dialog (see Figure 1). The sample application compares the first language in the culture list sent by the browser to the list of cultures supported by the application, and if there's a match, it selects that culture; otherwise, the site uses the default culture.