Platform notes¶
These notes describe runtime support and limitations.
PHP limitations¶
PHP v3 supports compact(), relativeDuration(), numberRange(), moneyRange(),
and dateRange(). Where ext-intl lacks a formatter, Cosmo reads CLDR
ResourceBundle data to assemble the result. Two limitations apply:
dateRange()supportsshort/mediumonly (CLDR ships no long/full interval skeletons thatext-intlcan reach); it throws on long/full.moneyRange()is approximate — it fills the CLDR range pattern but doesn't collapse the shared currency symbol the way native ICU does.
The following methods are unavailable in PHP because ext-intl does not expose
the required APIs:
addLikelySubtags()/removeLikelySubtags()— no likely-subtags algorithmbestMatch()/ negotiatingfromAcceptLanguage()— noLocaleMatcherbindingindexBuckets()— noAlphabeticIndexbinding
Locale data¶
Cosmo reads locale data from ICU instead of maintaining hardcoded tables.
Where a dedicated formatter is unavailable, the library assembles the result
from ICU ResourceBundle data.
Data updates follow the runtime or bundled ICU version. Updating Cosmo alone
does not necessarily update locale data.