NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1795 most downloaded on Packagist
Internationalization library powered by CLDR data.
Latest stable
v2.1.0
Last release 2 months ago
23 Sep 2026
Release timing varies
gaps range from 1 weeks to 1.4 years
Some releases are documented
notes for 17 of 33 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
33 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Adds Currency::getDisplayFractionDigits(), separate from Currency::getFractionDigits():
Adds Currency::getDisplayFractionDigits(), separate from Currency::getFractionDigits():
getFractionDigits(): the ISO 4217 minor units, used for rounding and converting amounts to minor units (e.g. for payment gateways).getDisplayFractionDigits(): the CLDR display digits, used by CurrencyFormatter as the default number of decimals. Falls back to getFractionDigits() when not set.This restores the CLDR display digits that v2.0.10 replaced. COP, HUF, IDR, PKR, AFN, ALL, IQD, IRR, KPW, LAK, LBP, MGA, MMK, SOS, SYP and YER are formatted without their unused minor unit again (e.g. 9 505 Ft), while their fraction digits stay ISO 4217. Pass minimum_fraction_digits / maximum_fraction_digits to override.
Currency objects created without display_fraction_digits (e.g. by custom currency repositories) keep their current formatting.
Currency fraction digits now come from ISO 4217 instead of CLDR.
Currency fraction digits now come from ISO 4217 instead of CLDR.
CLDR 48 (shipped in v2.0.8) changed the fraction digits of COP, HUF, IDR and PKR from 2 to 0. Consumers such as Drupal Commerce use these digits to convert amounts to payment gateway minor units, so payments in those currencies were sent at 1/100 of the amount (see https://www.drupal.org/project/commerce/issues/3625166).
Fraction digit changes:
The default number of decimals shown by CurrencyFormatter follows these values, so HUF is formatted with 2 decimals again. Pass maximum_fraction_digits to override.
No other data changes.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Tagged by mistake: identical to v2.0.8. Use v2.0.10, which contains the fraction digits fix.
Tagged by mistake: identical to v2.0.8. Use v2.0.10, which contains the fraction digits fix.
Fetched fresh cldr-json v48.2.0 + ISO currency list, regenerated currency/language/locale/number-format data.
Update to CLDR v48.2.
cldr-json v48.2.0 + ISO currency list, regenerated currency/language/locale/number-format data.src/Currency/CurrencyRepository.php, src/Language/LanguageRepository.php, src/Locale.php ($parents), src/NumberFormat/NumberFormatRepository.php, plus resources/currency/ and resources/language/ JSON.scripts/generate_number_format_data.php: it wasn't escaping single quotes in exported values, which broke on de-CH/de-LI's new apostrophe grouping separator (') — added addslashes().fr-CH now uses ' as grouping separator per CLDR v48.2) — root cause was genuine data change, not a bad test.Nothing published for this version
Nothing published for this version
Nothing published for this version
Update to CLDR v43 and switch to the CLDR modern subset.
Update to CLDR v43 and switch to the CLDR modern subset.
Nothing published for this version
Fix several return types.
Fix several return types.
Fix the return type in Currency::getFractionDigits().
Fix the return type in Currency::getFractionDigits().
Nothing published for this version
Nothing published for this version
Nothing published for this version
Updated to CLDR v39. Dropped support for PHP 7.0
Updated to CLDR v39.
Dropped support for PHP 7.0
Nothing published for this version
Added support for currencyGroup and currencyDecimal symbols, fixing #80. This improves currency formatting for de-AT and fr-CH.
Added support for currencyGroup and currencyDecimal symbols, fixing #80. This improves currency formatting for de-AT and fr-CH.
Thanks to Linus Metzler (limenet) for the feature.
Nothing published for this version
Nothing published for this version
Fix LanguageRepository::get() with complex language codes (such as nl-BE). See #70.
Fix LanguageRepository::get() with complex language codes (such as nl-BE). See #70.
Nothing published for this version
Nothing published for this version
[Regression] NumberFormatter no longer accepts floats. Fixes #68.
[Regression] NumberFormatter no longer accepts floats. Fixes #68.
Confirmed that no updates are needed for CLDR v33.1
The country list has been moved to commerceguys/addressing.
Nothing published for this version
Add accidentally forgotten new CLDR translations.
Updated to CLDR v30.0.2 Fixed currency codes for the CN, VG and ZA countries.
Updated to CLDR v30.0.2 Fixed currency codes for the CN, VG and ZA countries.
Moved the bcmath requirement from composer.json to NumberFormatter.
Moved the bcmath requirement from composer.json to NumberFormatter.
Nothing published for this version
Reduced the dataset size by 20% through whitespace optimization.
Reduced the dataset size by 20% through whitespace optimization.
Updated to CLDR v28. Made setters optional on the base interfaces. See https://github.com/commerceguys/tax/issues/26 Fixed a bug in NumberFormatter: h
Updated to CLDR v28. Made setters optional on the base interfaces. See https://github.com/commerceguys/tax/issues/26 Fixed a bug in NumberFormatter: https://github.com/commerceguys/intl/pull/15
Nothing published for this version
Nothing published for this version
One column per quarter.