Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AutoDetect User's Language Preference

0 views
Skip to first unread message

Dann Goddu

unread,
Feb 4, 2002, 6:26:16 PM2/4/02
to
I am looking for a way to detect the language setting of a
user, and redirect the user to the appropriate version of
a web site.

For example, if a user would running the French version of
Windows, that user would automatically be presented with
the French version of the web site.

Is there a client variable that contains that information?

(I am looking for an alternative to having the user select
a language preference and writing their selection to a
cookie.)

Thank you.

Igor Tandetnik

unread,
Feb 5, 2002, 9:59:45 AM2/5/02
to
The usual way is for the server to make use of Accept-Language HTTP
request header. See KB Article Q208935 "Redirection Based on
Accept-Language Using ASP". The user can configure this header through
Tools | Internet Options | General | Languages dialog. I would expect
that a localized version of the browser comes preset with the
appropriate language but I don't have one to check.

If you insist on client-side solution, see navigator.userLanguage or
clientInformation.userLanguage
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken

"Dann Goddu" <dgo...@grandvirtual.com> wrote in message
news:f10501c1add3$57b021b0$a5e62ecf@tkmsftngxa07...

0 new messages