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

[whatwg] Localisation of form fields

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Mon, 7 May 2012 11:09:10 +0100
Message-ID: <CAEhSh3ew3Ht8Mji1DKu3p6cLsKMV9oj4kbuvVuiXA9G6t1Basw@mail.gmail.com>
>> 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
Received on Monday, 7 May 2012 03:09:10 GMT

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