Igor
Igor

Reputation: 6267

How to detect client language settings in ASP?

ALL, What I mean is when I type, for example, www.gmail.com and my computer default langauge is Russian I see Russian text, and when my computer default language is English I see an English text.

Can I do that with ASP?

Thank you.

Upvotes: 0

Views: 6192

Answers (3)

Radu094
Radu094

Reputation: 28424

Request.UserLanguages will contain an ordered list of the culture preferences set in the client browser

Upvotes: 0

MikeM
MikeM

Reputation: 27405

Use the Accept-Language header value:

Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"];

or

Request.Headers["accept-language"];

result looks something like en-US,en;q=0.8

the first segment (before the ;) is a comma separated list of language identifiers ordered by preference.

Upvotes: 3

ryudice
ryudice

Reputation: 37406

Yes, it's called localization, you can do that using resource files, check here http://msdn.microsoft.com/en-us/library/ms228208.aspx

Upvotes: 0

Related Questions