Getting the locale of the browser...

S

Stu Lock

Hi,

I am writing a web app which is going to be used primarily in the UK and
Canada. Is ther any way of determining where the user is (without an IP
address db). It is not for core functionality - just to be able to set
defaults in coutry drop downs etc.

Thanks in advance,

Stu
 
S

Scott Mitchell [MVP]

Stu said:
I am writing a web app which is going to be used primarily in the UK and
Canada. Is ther any way of determining where the user is (without an IP
address db). It is not for core functionality - just to be able to set
defaults in coutry drop downs etc.

Stu, you can use the Accept-Language HTTP header the browser sends as a
starting point. This page discusses the pros and cons of using this header:
http://www.w3.org/International/questions/qa-accept-lang-locales

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com

* When you think ASP.NET, think 4GuysFromRolla.com!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,691
Members
48,796
Latest member
Greg L.

Latest Threads

Top