RE: Locale-based forms in HTML pages

One thing that comes to mind today: we have a document called "Language Tags and Locale Identifiers" which is currently abandoned in working draft status:

http://www.w3.org/TR/ltli/


This document is pretty old: it predates the current BCP 47. Its purpose was to help define how matching, fallbacks, defaults, and such should be implemented. I'm wondering if we should update the document and perhaps use it to address some of these issues.

Addison

> -----Original Message-----
> From: Richard Ishida [mailto:ishida@w3.org]
> Sent: Wednesday, October 15, 2014 3:07 PM
> To: www International
> Subject: Re: Locale-based forms in HTML pages
> 
> I just added some exploratory tests for number formats at
> 
> http://www.w3.org/International/tests/test-incubator/locales-in-

> forms/numbers.html
> 
> 
> I believe that only Firefox supports the behaviour at the moment.
> 
> Things to note:
> 
> - hint: fr and de and ar produce a result
> 
> - if you use ar or ar-OM, you get arabic-indic digits, however if you use ar-MA
> you get European digits (which is good)
> 
> - if you use de or de-DE you get a comma for a decimal separator, however if
> you use de-CH you get a period (which i think is also good), however you
> don't seem to get any thousands separators - which perhaps helps with the
> Swiss situation where currency format is different from general numbers in
> that respect
> 
> - if you use fr or de you can type in 1'234,56 or 1 234,56 or 1234,56 and the
> browser stores 1234.56
> 
> - if you use fr and type in 1003,5 it stores 1003.5 (all fine so far).
> If you type in
>  1003.5 it stores 1003.5
> This is a slight surprise, but you can see the logic that was followed, especially
> when
>  100.35 gives 100.35
> and
>  10.035 gives 10035
> However, a security issue lurks here. In Oman prices are quoted to 3 decimal
> places, eg. 1.003 rials.  Set the lang attribute to ar-OM and type in ١٫٠٠٣ and
> you get 1.003 (which is fine), but type in ١.٠٠٣ like we just did for fr, and you
> get 1003, which is not at all the same thing!
> 
> ri
> 
> 
> 
> On 15/10/2014 18:27, Richard Ishida wrote:
> > Recently, a Blink intent to implement was published. It proposes that
> > in HTML the form control UI should respect lang attribute values,
> > instead of the browser UI locale. This feature will be applied to
> > submit, reset, number, date, datetime-local, month, time, week input
> types, and so on.
> >   It would involve both:
> >
> > a. production of translated text for controls, such as 'Submit' on
> > buttons
> >
> > b. automatic presentation of data formats, such as date, time,
> > numbers, etc, per locale information relevant to the content of the page.
> >
> > The i18n WG is using a wiki page to capture and consolidate thinking
> > on any issues associated with this. On the face of it seems like a
> > good idea, however, there is a concern that there may be some security
> > and usability issues. We would like to explore this and capture
> > anything that needs to be addressed.
> >
> > An initial draft of the page can be found at:
> > https://www.w3.org/International/wiki/Locale-based_forms

> 

Received on Thursday, 16 October 2014 18:48:59 UTC