[Bug 17859] Mechanism to enable localisation of form controls and other locale-specific data

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17859

--- Comment #22 from Addison Phillips <addison@lab126.com> ---
(In reply to Ian 'Hixie' Hickson from comment #20)
> Say you have a page that says:
> 
>    <body lang="en-US">
>      <p>Enter your date: <input type=date></p>
>    </body>
> 
> ...and you view it today in a UK setting. You'll geta UK widget. If we
> change the widget based on the lang="" attribute, the page will change
> behaviour, in a way that the author never expected nor tested for. Given the
> prevalence of copy-paste authoring, it's extremely likely that there'll be
> many pages with this kind of thing going on. It's bad form to take something
> that previously had no effect, and make it have an effect of changing the
> user's interface.
> 
I don't agree that the page will "change behavior in a way that the author
never expected nor tested for". The current behavior is that the page author
has no control over how the date input control appears (assuming there is
anything more than a text box). The user-agent looks at the user's environment
to determine locale and the presentation used is often quite different from
what the page author would want (which is usually consistency with the page).
The only way the page author could have an "expectation" or test for anything
would be to try every browser in every locale combination on every platform.

It's my experience that developers wishing to work around this use JS widgets
that they enforce the localization on or they call the server to format strings
for them. Either is a huge pain. The JS Intl extension helps by putting the
formatting capability into JS. But that still leaves this bug: providing a
convenient, consistent way to format data values into strings or widgets would
be a benefit to page authors (who could control what the user sees without lots
of special effort) and users (who get a consistent page and browser experience)
without breaking existing pages.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 22 July 2014 16:24:27 UTC