1``currency_name`` 2================= 3 4.. versionadded:: 2.12 5 6 The ``currency_name`` filter was added in Twig 2.12. 7 8The ``currency_name`` filter returns the currency name given its three-letter 9code: 10 11.. code-block:: twig 12 13 {# Euro #} 14 {{ 'EUR'|currency_name }} 15 16 {# Japanese Yen #} 17 {{ 'JPY'|currency_name }} 18 19By default, the filter uses the current locale. You can pass it explicitly: 20 21.. code-block:: twig 22 23 {# yen japonais #} 24 {{ 'JPY'|currency_name('fr_FR') }} 25 26.. note:: 27 28 The ``currency_name`` filter is part of the ``IntlExtension`` which is not 29 installed by default. Install it first: 30 31 .. code-block:: bash 32 33 $ composer require twig/intl-extra 34 35 Then, on Symfony projects, install the ``twig/extra-bundle``: 36 37 .. code-block:: bash 38 39 $ composer require twig/extra-bundle 40 41 Otherwise, add the extension explicitly on the Twig environment:: 42 43 use Twig\Extra\Intl\IntlExtension; 44 45 $twig = new \Twig\Environment(...); 46 $twig->addExtension(new IntlExtension()); 47 48Arguments 49--------- 50 51* ``locale``: The locale 52