W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

(unknown charset) [whatwg] Localisation of form fields

From: (unknown charset) Bronislav Klučka <Bronislav.Klucka@bauglir.com>
Date: Mon, 07 May 2012 12:20:24 +0200
Message-ID: <4FA7A1E8.3020806@bauglir.com>


On 7.5.2012 12:09, Benjamin Hawkes-Lewis wrote:
>>> 2/ FormatSettings object
>>> [Constructor(),
>>>   Constructor(DOMString locale),
>>>   Constructor(FormatSettings locale),
>>> ]
>>> interface FormatSettings {
>>>     attribute DOMString CurrencyString;
>>>     attribute Number CurrencyFormat;
>>>     attribute Number CurrencyDecimals;
>>>     attribute DOMString ThousandSeparator;
>>>     attribute DOMString DecimalSeparator;
>>>     attribute DOMString DateSeparator;
>>>     attribute DOMString TimeSeparator;
>>>     attribute DOMString ShortDateFormat;
>>>     attribute DOMString LongDateFormat;
>>>     attribute DOMString TimeAMString;
>>>     attribute DOMString TimePMString;
>>>     attribute DOMString ShortTimeFormat;
>>>     attribute DOMString LongTimeFormat;
>>>     attribute Array ShortMonthNames;
>>>     attribute Array LongMonthNames;
>>>     attribute Array ShortDayNames;
>>>     attribute Array LongDayNames;
>>>     attribute bool DaylightSavingTime;
>>>     attribute Number TimeZoneOffset;
>>>
>>>     DOMString format (String input, Array data)
>>>
>>>     Number CurrencyAsNumber (DOMString value)
>>>     Number StringAsNumber (DOMString value)
>>>     Date StringAsDate (DOMString value)
>>>
>>>    [and probably set of constants representing different types of error
>>> regarding formatting and data sanitation]
>>> }
>> What does the JS library space look like on this front? Is this something
>> that's done at all?
> What are you looking for?
>
> There is plenty of JS i18n code out there for formatting and parsing
> dates and numbers.
>
> Are you talking specifically about conversion of form values between
> an over-the-wire format and a localized display format?
>
> --
> Benjamin Hawkes-Lewis

Not at all, those function are just additions for the code of this 
object: actual user's OS settings of localization parameters (those 
object attributes).

Brona
Received on Monday, 7 May 2012 03:20:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT