Skip to content

Commit 540cefe

Browse files
committed
[Form] add choice_translation_domain option to date types
1 parent 3d3bac0 commit 540cefe

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

reference/forms/types/birthday.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ option defaults to 120 years ago to the current year.
2424
+----------------------+-------------------------------------------------------------------------------+
2525
| Inherited options | from the :doc:`DateType </reference/forms/types/date>`: |
2626
| | |
27+
| | - `choice_translation_domain`_ |
2728
| | - `days`_ |
2829
| | - `placeholder`_ |
2930
| | - `format`_ |
@@ -64,6 +65,8 @@ Inherited Options
6465

6566
These options inherit from the :doc:`DateType </reference/forms/types/date>`:
6667

68+
.. include:: /reference/forms/types/options/datetime_choice_translation_domain.rst.inc
69+
6770
.. include:: /reference/forms/types/options/days.rst.inc
6871

6972
placeholder

reference/forms/types/date.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ day and year) or three select boxes (see the `widget`_ option).
1919
+----------------------+-----------------------------------------------------------------------------+
2020
| Rendered as | single text box or three select fields |
2121
+----------------------+-----------------------------------------------------------------------------+
22-
| Options | - `days`_ |
22+
| Options | - `choice_translation_domain`_ |
23+
| | - `days`_ |
2324
| | - `placeholder`_ |
2425
| | - `format`_ |
2526
| | - `html5`_ |
@@ -85,6 +86,8 @@ values.
8586
Field Options
8687
-------------
8788

89+
.. include:: /reference/forms/types/options/datetime_choice_translation_domain.rst.inc
90+
8891
.. include:: /reference/forms/types/options/days.rst.inc
8992

9093
placeholder

reference/forms/types/datetime.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array.
1515
+----------------------+-----------------------------------------------------------------------------+
1616
| Rendered as | single text box or three select fields |
1717
+----------------------+-----------------------------------------------------------------------------+
18-
| Options | - `date_format`_ |
18+
| Options | - `choice_translation_domain`_ |
19+
| | - `date_format`_ |
1920
| | - `date_widget`_ |
2021
| | - `days`_ |
2122
| | - `placeholder`_ |
@@ -55,6 +56,8 @@ the data can be a ``DateTime`` object, a string, a timestamp or an array.
5556
Field Options
5657
-------------
5758

59+
.. include:: /reference/forms/types/options/datetime_choice_translation_domain.rst.inc
60+
5861
date_format
5962
~~~~~~~~~~~
6063

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
choice_translation_domain
2+
~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
.. versionadded:: 2.8
5+
The ``choice_translation_domain`` option was introduced in Symfony 2.8.
6+
7+
**type**: ``string``, ``boolean`` or ``null``
8+
9+
This option determines if the choice values should be translated and in which
10+
translation domain.
11+
12+
The values of the ``choice_translation_domain`` option can be ``true`` (reuse the current
13+
translation domain), ``false`` (disable translation), ``null`` (uses the parent translation
14+
domain or the default domain) or a string which represents the exact translation
15+
domain to use.

reference/forms/types/time.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ stored as a ``DateTime`` object, a string, a timestamp or an array.
1515
+----------------------+-----------------------------------------------------------------------------+
1616
| Rendered as | can be various tags (see below) |
1717
+----------------------+-----------------------------------------------------------------------------+
18-
| Options | - `placeholder`_ |
18+
| Options | - `choice_translation_domain`_ |
19+
| | - `placeholder`_ |
1920
| | - `hours`_ |
2021
| | - `html5`_ |
2122
| | - `input`_ |
@@ -82,6 +83,8 @@ values.
8283
Field Options
8384
-------------
8485

86+
.. include:: /reference/forms/types/options/datetime_choice_translation_domain.rst.inc
87+
8588
placeholder
8689
~~~~~~~~~~~
8790

0 commit comments

Comments
 (0)