i18n NumberFormat and skeleton (in addition to pattern parameter)

Nebojša Ćirić cira at google.com
Mon May 23 11:50:06 PDT 2011


I should have used ¤ (\u00A4) instead of $.

So ¤ gets replaced with proper currency symbol/code.

23. мај 2011. 11.08, Mike Samuel <mikesamuel at gmail.com> је написао/ла:

> 2011/5/20 Nebojša Ćirić <cira at google.com>:
> > Current proposal for NumberFormat specifies style (percent, currency,
> > decimal...) or a pattern to use to create a formatter.
> > We could add support for skeleton parameter (like date time formatter
> has)
> > to help developers get patterns they want but without worry about locale
> > specific issues. For example:
> > Skeleton (I'll use $ for currency part):
> >   $0,00.000###
> > says - minimum 3 integer digits, use grouping separator (because of ,),
> > minumum 3 decimal digits, maximum 6 decimal digits.
> > Possible patterns:
> > en: #,000.000### $
> > in: $ #,##,#000.000###
>
> Does the "$" in "$ #,##,#000.000###" get replaced with a currency
> symbol from a separate locale->currency symbol table or should this
> read "₨ #,##,#000.000###"?
>
> Can a currency symbol come from something associated with the value
> being formatted, e.g. { quantity: 1234, currencyType: "₨" }.
>
>
> >
> > We could also support ; (separator for +/- parts of pattern) in the
> > skeleton. In that case we would find patterns for both parts and then
> join
> > them.
> > Number formatting was one item we didn't finish last time, so I expect
> more
> > discussion on Monday.
> > --
> > Nebojša Ćirić
> >
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss at mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
> >
> >
>



-- 
Nebojša Ćirić
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110523/00881811/attachment.html>


More information about the es-discuss mailing list