8000 minor #9799 [Form] Add choice_translation_locale option for Intl choi… · symfony/symfony-docs@68dc3db · GitHub
[go: up one dir, main page]

Skip to content

Commit 68dc3db

Browse files
committed
minor #9799 [Form] Add choice_translation_locale option for Intl choice types (yceruto)
This PR was merged into the 4.1 branch. Discussion ---------- [Form] Add choice_translation_locale option for Intl choice types closes #9657 Commits ------- bf10fd2 Add the new choice translation locale option to Intl form types
2 parents 89f98ee + bf10fd2 commit 68dc3db

File tree

5 files changed

+38
-0
lines changed

5 files changed

+38
-0
lines changed

reference/forms/types/country.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
2121
+-------------+-----------------------------------------------------------------------+
2222
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2323
+-------------+-----------------------------------------------------------------------+
24+
| Options | - `choice_translation_locale`_ |
25+
+-------------+-----------------------------------------------------------------------+
2426
| Overridden | - `choices`_ |
2527
| options | |
2628
+-------------+-----------------------------------------------------------------------+
@@ -51,6 +53,11 @@ the option manually, but then you should just use the ``ChoiceType`` directly.
5153
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` |
5254
+-------------+-----------------------------------------------------------------------+
5355

56+
Field Options
57+
-------------
58+
59+
.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc
60+
5461
Overridden Options
5562
------------------
5663

reference/forms/types/currency.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ manually, but then you should just use the ``ChoiceType`` directly.
1414
+-------------+------------------------------------------------------------------------+
1515
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
1616
+-------------+------------------------------------------------------------------------+
17+
| Options | - `choice_translation_locale`_ |
18+
+-------------+------------------------------------------------------------------------+
1719
| Overridden | - `choices`_ |
1820
| options | |
1921
+-------------+------------------------------------------------------------------------+
@@ -43,6 +45,11 @@ manually, but then you should just use the ``ChoiceType`` directly.
4345
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType` |
4446
+-------------+------------------------------------------------------------------------+
4547

48+
Field Options
49+
-------------
50+
51+
.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc
52+
4653
Overridden Options
4754
------------------
4855

reference/forms/types/language.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ manually, but then you should just use the ``ChoiceType`` directly.
2323
+-------------+------------------------------------------------------------------------+
2424
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2525
+-------------+------------------------------------------------------------------------+
26+
| Options | - `choice_translation_locale`_ |
27+
+-------------+------------------------------------------------------------------------+
2628
| Overridden | - `choices`_ |
2729
| options | |
2830
+-------------+------------------------------------------------------------------------+
@@ -53,6 +55,11 @@ manually, but then you should just use the ``ChoiceType`` directly.
5355
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` |
5456
+-------------+------------------------------------------------------------------------+
5557

58+
Field Options
59+
-------------
60+
61+
.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc
62+
5663
Overridden Options
5764
------------------
5865

reference/forms/types/locale.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ manually, but then you should just use the ``ChoiceType`` directly.
2424
+-------------+------------------------------------------------------------------------+
2525
| Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) |
2626
+-------------+------------------------------------------------------------------------+
27+
| Options | - `choice_translation_locale`_ |
28+
+-------------+------------------------------------------------------------------------+
2729
| Overridden | - `choices`_ |
2830
| options | |
2931
+-------------+------------------------------------------------------------------------+
@@ -54,6 +56,11 @@ manually, but then you should just use the ``ChoiceType`` directly.
5456
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType` |
5557
+-------------+------------------------------------------------------------------------+
5658

59+
Field Options
60+
-------------
61+
62+
.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc
63+
5764
Overridden Options
5865
------------------
5966

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
choice_translation_locale
2+
~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
**type**: ``string`` or ``null`` **default**: ``null``
5+
6+
This option determines if the choice values should be translated into a different locale
7+
than the current one.
8+
9+
The values of the ``choice_translation_locale`` option can be ``null`` (reuse the current
10+
translation locale) or a string which represents the exact translation locale to use.

0 commit comments

Comments
 (0)
0