>I am tying to retrieve the user's default language to display the resources
according to the language. For example, if the user is from germany, i will
display the german resources without asking him having to log in first.
The following code will list the users preferred languages in descending
order.
int count;
string[] languages= Request.UserLanguages;
for (count = 0; count < languages.Length; count++) {
Response.Write("Language " + count +": " + languages[count] + "<br>");
}
The language preference is retrieved from the browser. In Internet Explorer
you can set language preferences in the Tools -> Internet Options ->
Languages dialog.
Please note that the language settings reflect which languages the user
preferes, not the country he or she resides in.
Anders Norås
http://dotnetjunkies.com/weblog/anoras/