I18N API status update

Jungshik Shin (신정식, 申政湜) jungshik at google.com
Wed Jul 6 15:47:36 PDT 2011

Hi all,

Below is the summary of changes we made on I18N API at the last face-to-face
meeting along with the list of open issues to discuss.  The summary and the
list were prepared by Nebojsa Ciric (cira at google.com). The full API is
available at

, which will be used as the basis for first draft for the standard document
to deliver.

Language matching
- Match base language (de-DE) with supported locales.
- Keep the original extension for matched locale.
- If one of the requested locales is exact match to supported locales then
exact match should be picked (see examples).
- Order in the priority list breaks ties.
- Pick navigator.language as default locale in browser environment.

request [A, B], supported {A, B}, pick A, order breaks tie.
request [A, B], supported {A', B}, pick B. A' is a near perfect match.
request [A, B], supported {A', B'}, implementation dependent.

Date time formatting
- timeStyle - long and full values are optional.
- dateStyle - medium and full values are optional.
- Added link to LDML for skeleton fields description (to strawman).
- Narrow width is optional for date time symbols ('abbreviated' and 'wide'
are required).
- Calendar option removed from settings. We'll use locale
-u-ca-calendar_name to specify calendar.

Number formatting
- Do we need integer style? Probably not since decimal style can do the same
if we pass integer as a value.
- Keep pattern parameter for cases where users want strict format.
- Add skeleton to help with automatic placement of: sign, currency, percent
symbol and grouping digits. Added link to design doc at ICU site.
- Added link to LDML spec for number format (to strawman).

- Drop type parameter (search/sort), and let user set sensitivity level for
- Added detailed section with parameters to strawman (numeric,
ignorePunctuation, sensitivity(base, case, accent, all, default...).
- User can specify some of the parameters in the languageID i.e. -u-kn-true.

Parameter/error handling (Open issues):
- Use default locale in case none is supplied or matched.
- For dates return current date
- For numbers return "NaN"
- Throwing an exception is ugly since each format/constructor would have to
be enclosed in try/catch.

The document is at http://wiki.ecmascript.org/doku.php?id=strawman:i18n_api

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110706/78277cb6/attachment.html>

More information about the es-discuss mailing list