polyfill icon indicating copy to clipboard operation
polyfill copied to clipboard

Add `IntlListFormatter`

Open nicolas-grekas opened this issue 6 months ago • 4 comments

See https://ungureanu.blog/2025/06/24/new-in-php-intl-8-5-intllistformatter-display-arrays-as-locale-aware-lists/

I'd suggest handling only a few locales (or maybe only "en" as a start), with the rules from https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-misc-full/main/en/listPatterns.json

nicolas-grekas avatar Jun 25 '25 06:06 nicolas-grekas

I suggest implementing IntlListFormatter only for en, like all our other formatters in symfony/polyfill-intl-icu. Projects wanting to support all locales will need to install ext-intl to have access to the ICU data.

stof avatar Jun 25 '25 12:06 stof

@stof this makes sense, it'll be a lot of work to keep them in sync with ICU data.

I'd like to work on in this weekend, but if someone's already working on it or would like to, please go ahead :)

Ayesh avatar Jun 25 '25 12:06 Ayesh

@Ayesh are you still interested to work on this one? If not, I could pick it up too.

BogdanUngureanu avatar Jun 28 '25 11:06 BogdanUngureanu

Oh cool, I started this morning, I will have the PR shortly. Looking forward to your review @BogdanUngureanu.

Ayesh avatar Jun 28 '25 12:06 Ayesh