IntlListFormatter::__construct
Creates a new IntlListFormatter instance
Description
Creates a new IntlListFormatter instance for the given locale.
Parameters
localeThe locale to use for formatting.
typeThe list type. One of the
IntlListFormatter::TYPE_*constants:IntlListFormatter::TYPE_AND,IntlListFormatter::TYPE_OR, orIntlListFormatter::TYPE_UNITS.widthThe list width. One of the
IntlListFormatter::WIDTH_*constants:IntlListFormatter::WIDTH_WIDE,IntlListFormatter::WIDTH_SHORT, orIntlListFormatter::WIDTH_NARROW.
Errors/Exceptions
Throws an IntlException if the formatter cannot be created (e.g. invalid locale or ICU version is below 67).
Changelog
| Version | Description |
|---|---|
| 8.5.0 | The class was added. |
See Also
IntlListFormatter::format