8000 minor #11867 [Form] Documented the intl option in TimezoneType (javie… · symfony/symfony-docs@7332730 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7332730

Browse files
committed
minor #11867 [Form] Documented the intl option in TimezoneType (javiereguiluz)
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
2 parents a183e0e + d96e56e commit 7332730

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

reference/forms/types/timezone.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ manually, but then you should just use the ``ChoiceType`` directly.
1818
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
1919
+-------------+------------------------------------------------------------------------+
2020
| Options | - `input`_ |
21+
| | - `intl`_ |
2122
| | - `regions`_ |
2223
+-------------+------------------------------------------------------------------------+
2324
| Overridden | - `choices`_ |
2425
| options | |
2526
+-------------+------------------------------------------------------------------------+
2627
| Inherited | from the :doc:`ChoiceType </reference/forms/types/choice>` |
2728
| options | |
29+
| | - `choice_translation_domain`_ |
2830
| | - `expanded`_ |
2931
| | - `multiple`_ |
3032
| | - `placeholder`_ |
@@ -73,6 +75,28 @@ on your underlying object. Valid values are:
7375

7476
The ``intltimezone`` input type was introduced in Symfony 4.3.
7577

78+
intl
79+
~~~~
80+
81+
*type**: ``boolean`` **default**: ``false``
82+
83+
.. versionadded:: 4.3
84+
85+
This option was introduced in Symfony 4.3.
86+
87+
If this option is set to ``true``, the timezone selector will display the
88+
timezones from the `ICU Project`_ via the :doc:`Intl component </components/intl>`
89+
instead of the regular PHP timezones.
90+
91+
Although both sets of timezones are pretty similar, only the ones from the Intl
92+
component can be translated to any language. To do so, set the desired locale
93+
with the ``choice_translation_locale`` option.
94+
95+
.. note::
96+
97+
The :doc:`Timezone constraint </reference/constraints/Timezone>` can validate
98+
both timezone sets and adapts to the selected set automatically.
99+
76100
regions
77101
~~~~~~~
78102

@@ -105,6 +129,8 @@ Inherited Options
105129

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

< 7FA8 div aria-hidden="true" class="position-absolute top-0 d-flex user-select-none DiffLineTableCellParts-module__comment-indicator--eI0hb">
132+
.. include:: /reference/forms/types/options/choice_translation_domain.rst.inc
133+
108134
.. include:: /reference/forms/types/options/expanded.rst.inc
109135

110136
.. include:: /reference/forms/types/options/multiple.rst.inc
@@ -152,3 +178,5 @@ The actual default value of this option depends on other field options:
152178
.. include:: /reference/forms/types/options/mapped.rst.inc
153179

154180
.. include:: /reference/forms/types/options/required.rst.inc
181+
182+
.. _`ICU Project`: http://site.icu-project.org/

0 commit comments

Comments
 (0)
0