The Symfony Polyfill / Intl MessageFormatter Component

This component provides a fallback implementation for the MessageFormatterclass to users who run PHP versions without the intl extension.

Installation

  1. $ composer require symfony/polyfill-intl-messageformatter

Note

If you install this component outside of a Symfony application, you mustrequire the vendor/autoload.php file in your code to enable the classautoloading mechanism provided by Composer. Readthis article for more details.

Usage

Once this component is installed in your application, you can use the followingclasses and functions, no matter if the PHP intl extension is installed ornot in your server.

Provided Classes

Provided Functions

Symfony provides more polyfills for other classes and functions related tothe Intl PHP extension:polyfill-intl-grapheme,polyfill-intl-idn,polyfill-intl-icu,and polyfill-intl-normalizer.