Registry / utility / twig-intl-extra

twig-intl-extra

JSON →
library3.26.0phppackagistunverified

A Twig extension for Intl.

composer require twig/intl-extra
INSTALL
IMPORT
SIG · TWIG-INTL-EXTRA
T
twig-intl-extra
utilityphpv3.26.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IntlExtension
use Twig\Extra\Intl\IntlExtension;

Add Intl extension to Twig for localized date formatting.

use Twig\Extra\Intl\IntlExtension; $twig = new \Twig\Environment(new \Twig\Loader\ArrayLoader()); $twig->addExtension(new IntlExtension()); echo $twig->render('{{ "now"|date("full", null, "Europe/Paris", "fr") }}');
Debug
Known issues
breakingRequires the intl PHP extension.
fix
Install php-intl via your package manager.
affects: >=3.0.0
Upgrade
Version history
3.26.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Resources
twig-intl-extra — pip install twig-intl-extra · libregistry