-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List formatting API #33
Comments
Relevant CLDR entry example: http://www.unicode.org/cldr/charts/27/summary/pl.html#6947 |
Doesn't Proposal seems reasonable. I would prefer it was on CLDR: Part 2 section 11 [ Also I think it's probably a good idea to link to the CLDR spec instead of just charts or data- The reason I say this is that the data can be mis interpreted without the context of the spec. Feel free to ping me if I can help locating something, and/or join cldr-users ] |
The only thing I could find in Ecma 402 13.4.1 and Ecma 262 22.1.3.26 is that it uses toLocaleString on its members and concatenates them using locale specific
I like it.
Good point.
I'm getting better at navigating CLDR docs. Better doesn't mean good yet, but I'll do better, thanks! :) |
FYI: [http://unicode.org/cldr/trac/ticket/8314](CLDR 8314) discussing |
Updated proposal API:
This API could also be used internally by UnitFormat, similarly to how ICU uses it in |
Here's a polyfill: https://github.com/zbraniecki/IntlListFormat |
This is looking great. Let's start working on the spec on https://github.com/zbraniecki/intl-list-format-spec, btw, there is a typo in the link from the polyfill to the spec. |
Thanks, fixed the link. I didn't finish the spec yet, I'll try to do this this week. |
Added more to the spec and added |
As for elements formatting, we will use |
Heads up, this has been advanced to Stage 0 as of today. |
@srl295 and I brought to cldr-users the topic of regular/duration lists vs. number/unit lists - http://unicode.org/pipermail/cldr-users/2016-March/000469.html Once this is resolved I'll provide the spec (I have the polyfill working) - https://github.com/l20n/mozintl/blob/master/src/formatters/list.js |
This proposal has been advanced to Stage 1 as of today. |
CLDR issue for types of lists: http://unicode.org/cldr/trac/ticket/9361 |
We plan to request stage 2 at the next TC39 meeting. |
The proposal has reached stage 2 as of today. |
The proposal has reached stage 3 as of today! |
I plan to offer https://github.com/tc39/proposal-intl-list-format for Stage 4 advancement at ECMA402 call this week. |
|
A common scenario is to have a list of items (Array in JS) which has to be formatted in a given language. CLDR provides all the patterns for that.
Example use cases:
Proposed API:
this would also supersede current
Array.prototype.toLocaleString
with ability to build better localized lists.I can imagine this not having it's own object and only extending Array.prototype.toLocaleString with options.
The text was updated successfully, but these errors were encountered: