R – Will HTML 5 specify a way to get the client’s location and culture info

ajaxgeolocationinternationalizationstandardsweb services

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

Best Answer

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?