views:

169

answers:

1

I have this web service... It serves up HTML in response to an AJAX request, and the web service needs to be aware of:

  1. the user's specific language
  2. the user's timezone or location

I understand that this is currently quite infeasible. BUT...

It seems that HTML 5 will have a Geolocation API! Awesome. This should take care of my timezone requirement (I can just look it up in a database somehow).

However, I would also like to know how to get their culture settings ("en-US", etc.) so I can render DateTimes and numbers from my web service to their specific preferences.


Note: this is a follow-up question to my other question: Finding the client's timezone and culture

A: 

This is in the HTTP header now - http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 - every language has a way to get this information. Which language is your web service implemented in?

stevedbrown
I have a .NET web service. In any case, thanks for your link - that's what I was looking for.
Jeff Meatball Yang
I was looking in the wrong places like the ECMAscript and HTML specs and browser-specific extensions. (Next time, I'll remember to look at HTTP, duh!)
Jeff Meatball Yang