[whatwg] Localisation of form fields

Bronislav Klučka Bronislav.Klucka at bauglir.com
Mon May 7 03:20:24 PDT 2012



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



More information about the whatwg mailing list