This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22679 - API to expose locale-specific settings
Summary: API to expose locale-specific settings
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 enhancement
Target Milestone: Needs Impl Interest
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-15 23:43 UTC by Ian 'Hixie' Hickson
Modified: 2016-03-22 14:53 UTC (History)
6 users (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-07-15 23:43:13 UTC
Bronislav Klučka points out that you can't, e.g., render a calendar using the user's (locale's) first week day, currently. CSS will likely offer ways to localise rendering of dates, times, numbers, etc, but that doesn't cover everything you might need.
Comment 1 Addison Phillips 2014-07-21 21:27:26 UTC
Can you explain further? What does "API" mean in this context?

Bug 17859 suggests that content markup might be used to address the page author's intentions regarding formatting. E.g. that a page in Czech that renders a calendar in Czech could format a calendar on that page using Czech locale rules (first day of week, weekend, day names/abbreviations, etc. etc.)

There may be cases where the page author intends the page the use or would like to have access to the user-agent's locale preferences. That also needs specification.

The advent of the JavaScript intl extension might help in terms of "API support", but since this is an HTML bug and, as Ian points out, CSS probably needs to provide ways of doing this, a clear HTML locale model is probably implied.

In my opinion, this should be based on the existing language tagging model (using the @lang attribute). I think Ian disagrees.
Comment 2 Ian 'Hixie' Hickson 2014-07-23 18:08:19 UTC
By "render a calendar" I mean generate <table> markup from script. By API I mean something like the JavaScript intl extensions, maybe in fact that very API.
Comment 3 Anne 2016-03-22 14:53:17 UTC
Let's leave this particular feature for TC39 to sort through.