Spec
https://tc39.github.io/proposal-intl-list-format
Summary
A Stage 3 proposal that introduces a new formatter under Intl.
Intl.ListFormat helps libraries and frameworks format a list in a localized fashion by providing internationalized messages using a customary local word or phrase when available. For example, calling its format() method with ["Alice", "Bob", "Charlie", "Delta"] would return the string "Alice, Bob, Charlie and Delta" in English.
let lf = new ListFormat("en"); lf.format(["Alice"]); // > "Alicce" lf.format(["Alice", "Bob"]); // > "Alice and Bob" lf.format(["Alice", "Bob", "Charlie"]); // > "Alice, Bob and Charlie" lf.format(["Alice", "Bob", "Charlie", "Delta"]); // > "Alice, Bob, Charlie and Delta" lf = new ListFormat("zh"); lf.format(["譚永鋒"]); // > "譚永鋒" lf.format(["譚永鋒", "劉新宇"]); // > "譚永鋒和劉新宇" |
Interoperability and compatibility risk
The Intl.ListFormat is new and should have no risk to break pre-existing javascript code.
Firefox:In development
Edge:No public signals
Safari:No public signals
Web Developers: No public signals
Is this feature fully tested?
Yes; our implementation passes our own V8 tests as well as the Test262 tests for all the features.
Tracking bug
Link to entry on the Chrome Platform Status dashboard
https://www.chromestatus.com/features/4764538272481280
Requesting approval to ship?
Yes. Note that since this is a V8/JS feature, this post is just an FYI to blink-dev — no signoff from Blink API owners is required.
--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADizRgYSZ0q81co3mW60DypEJZ%2B0GMdM_yphJa4_YcWRfvx-ZQ%40mail.gmail.com.