Getting the locale of the browser...

  • Thread starter Thread starter Stu Lock
  • Start date Start date
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
 
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!
 
Back
Top