From d96e56e8d8c5607abe89b5664b23e7b501066633 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 2 Jul 2019 16:45:43 +0200 Subject: [PATCH] [Form] Documented the intl option in TimezoneType --- reference/forms/types/timezone.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/reference/forms/types/timezone.rst b/reference/forms/types/timezone.rst index 96e61de0d34..07b45e19fd1 100644 --- a/reference/forms/types/timezone.rst +++ b/reference/forms/types/timezone.rst @@ -18,6 +18,7 @@ manually, but then you should just use the ``ChoiceType`` directly. | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ | Options | - `input`_ | +| | - `intl`_ | | | - `regions`_ | +-------------+------------------------------------------------------------------------+ | Overridden | - `choices`_ | @@ -25,6 +26,7 @@ manually, but then you should just use the ``ChoiceType`` directly. +-------------+------------------------------------------------------------------------+ | Inherited | from the :doc:`ChoiceType ` | | options | | +| | - `choice_translation_domain`_ | | | - `expanded`_ | | | - `multiple`_ | | | - `placeholder`_ | @@ -73,6 +75,28 @@ on your underlying object. Valid values are: The ``intltimezone`` input type was introduced in Symfony 4.3. +intl +~~~~ + +*type**: ``boolean`` **default**: ``false`` + +.. versionadded:: 4.3 + + This option was introduced in Symfony 4.3. + +If this option is set to ``true``, the timezone selector will display the +timezones from the `ICU Project`_ via the :doc:`Intl component ` +instead of the regular PHP timezones. + +Although both sets of timezones are pretty similar, only the ones from the Intl +component can be translated to any language. To do so, set the desired locale +with the ``choice_translation_locale`` option. + +.. note:: + + The :doc:`Timezone constraint ` can validate + both timezone sets and adapts to the selected set automatically. + regions ~~~~~~~ @@ -105,6 +129,8 @@ Inherited Options These options inherit from the :doc:`ChoiceType `: +.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc + .. include:: /reference/forms/types/options/expanded.rst.inc .. include:: /reference/forms/types/options/multiple.rst.inc @@ -152,3 +178,5 @@ The actual default value of this option depends on other field options: .. include:: /reference/forms/types/options/mapped.rst.inc .. include:: /reference/forms/types/options/required.rst.inc + +.. _`ICU Project`: http://site.icu-project.org/