Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7332730

Browse filesBrowse 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
Copy full SHA for 7332730

File tree

1 file changed

+28
-0
lines changed
Filter options

1 file changed

+28
-0
lines changed

‎reference/forms/types/timezone.rst

Copy file name to clipboardExpand all lines: reference/forms/types/timezone.rst
+28Lines 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

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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.