1``country_timezones``
2=====================
3
4.. versionadded:: 2.12
5
6    The ``country_timezones`` function was added in Twig 2.12.
7
8The ``country_timezones`` function returns the names of the timezones associated
9with a given country code:
10
11.. code-block:: twig
12
13    {# Europe/Paris #}
14    {{ country_timezones('FR')|join(', ') }}
15
16.. note::
17
18    The ``country_timezones`` function is part of the ``IntlExtension`` which is not
19    installed by default. Install it first:
20
21    .. code-block:: bash
22
23        $ composer require twig/intl-extra
24
25    Then, on Symfony projects, install the ``twig/extra-bundle``:
26
27    .. code-block:: bash
28
29        $ composer require twig/extra-bundle
30
31    Otherwise, add the extension explicitly on the Twig environment::
32
33        use Twig\Extra\Intl\IntlExtension;
34
35        $twig = new \Twig\Environment(...);
36        $twig->addExtension(new IntlExtension());
37