Skip to content

Commit

Permalink
minor #11867 [Form] Documented the intl option in TimezoneType (javie…
Browse files Browse the repository at this point in the history
…reguiluz)

This PR was squashed before being merged into the 4.3 branch (closes #11867).

Discussion
----------

[Form] Documented the intl option in TimezoneType

This fixes #11503.

Commits
-------

d96e56e [Form] Documented the intl option in TimezoneType
  • Loading branch information
javiereguiluz committed Jul 3, 2019
2 parents a183e0e + d96e56e commit 7332730
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions reference/forms/types/timezone.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ 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`_ |
| options | |
+-------------+------------------------------------------------------------------------+
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
| options | |
| | - `choice_translation_domain`_ |
| | - `expanded`_ |
| | - `multiple`_ |
| | - `placeholder`_ |
Expand Down Expand Up @@ -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 </components/intl>`
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 </reference/constraints/Timezone>` can validate
both timezone sets and adapts to the selected set automatically.

regions
~~~~~~~

Expand Down Expand Up @@ -105,6 +129,8 @@ Inherited Options

These options inherit from the :doc:`ChoiceType </reference/forms/types/choice>`:

.. 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
Expand Down Expand Up @@ -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/

0 comments on commit 7332730

Please sign in to comment.