I am starting this discussion to gather more info on localization practices for APIs. It seems HTTP does NOT provide sufficient guidance and even the state of practice is not su
Ok guys,
here is a summary of how I answer my question. I hope this helps future API authors.
The fundamental requirements for an UI based on top of API excluding currency presentation seem to be:
On the REST HTTP headers I suggest use of 3 headers
accept-language
- used for selecting translation and following the guidelines of RFC 7231 https://tools.ietf.org/html/rfc7231#section-5.3.5format-locale
- used to select data formatting style if different from the translation language preferences. Again list of language range elements. Defaults to accept-language
if omitted.timezone
- used to select timezone for rendering date and time values. This should be valid timezone ID from the IANA TZDB https://www.iana.org/time-zonesImplementation wise it seems Java 8 and later have full capability to implement a globalized application. Other languages and older Java versions seem to have varying degrees of issues.