I have this web service… It serves up HTML in response to an AJAX request, and the web service needs to be aware of:
- the user's specific language
- 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
Best Solution
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?