diff --git a/reference/forms/types/country.rst b/reference/forms/types/country.rst index b5155b9263e..cb563f7dede 100644 --- a/reference/forms/types/country.rst +++ b/reference/forms/types/country.rst @@ -21,6 +21,8 @@ the option manually, but then you should just use the ``ChoiceType`` directly. +-------------+-----------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+-----------------------------------------------------------------------+ +| Options | - `choice_translation_locale`_ | ++-------------+-----------------------------------------------------------------------+ | Overridden | - `choices`_ | | options | | +-------------+-----------------------------------------------------------------------+ @@ -51,6 +53,11 @@ the option manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CountryType` | +-------------+-----------------------------------------------------------------------+ +Field Options +------------- + +.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc + Overridden Options ------------------ diff --git a/reference/forms/types/currency.rst b/reference/forms/types/currency.rst index 7a355cf9f4c..0029d52c842 100644 --- a/reference/forms/types/currency.rst +++ b/reference/forms/types/currency.rst @@ -14,6 +14,8 @@ manually, but then you should just use the ``ChoiceType`` directly. +-------------+------------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ +| Options | - `choice_translation_locale`_ | ++-------------+------------------------------------------------------------------------+ | Overridden | - `choices`_ | | options | | +-------------+------------------------------------------------------------------------+ @@ -43,6 +45,11 @@ manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\CurrencyType` | +-------------+------------------------------------------------------------------------+ +Field Options +------------- + +.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc + Overridden Options ------------------ diff --git a/reference/forms/types/language.rst b/reference/forms/types/language.rst index 2cd15715d24..de265e60d12 100644 --- a/reference/forms/types/language.rst +++ b/reference/forms/types/language.rst @@ -23,6 +23,8 @@ manually, but then you should just use the ``ChoiceType`` directly. +-------------+------------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ +| Options | - `choice_translation_locale`_ | ++-------------+------------------------------------------------------------------------+ | Overridden | - `choices`_ | | options | | +-------------+------------------------------------------------------------------------+ @@ -53,6 +55,11 @@ manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LanguageType` | +-------------+------------------------------------------------------------------------+ +Field Options +------------- + +.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc + Overridden Options ------------------ diff --git a/reference/forms/types/locale.rst b/reference/forms/types/locale.rst index 4698cd338f1..200126e5f20 100644 --- a/reference/forms/types/locale.rst +++ b/reference/forms/types/locale.rst @@ -24,6 +24,8 @@ manually, but then you should just use the ``ChoiceType`` directly. +-------------+------------------------------------------------------------------------+ | Rendered as | can be various tags (see :ref:`forms-reference-choice-tags`) | +-------------+------------------------------------------------------------------------+ +| Options | - `choice_translation_locale`_ | ++-------------+------------------------------------------------------------------------+ | Overridden | - `choices`_ | | options | | +-------------+------------------------------------------------------------------------+ @@ -54,6 +56,11 @@ manually, but then you should just use the ``ChoiceType`` directly. | Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\LocaleType` | +-------------+------------------------------------------------------------------------+ +Field Options +------------- + +.. include:: /reference/forms/types/options/choice_translation_locale.rst.inc + Overridden Options ------------------ diff --git a/reference/forms/types/options/choice_translation_locale.rst.inc b/reference/forms/types/options/choice_translation_locale.rst.inc new file mode 100644 index 00000000000..92a8b16204e --- /dev/null +++ b/reference/forms/types/options/choice_translation_locale.rst.inc @@ -0,0 +1,10 @@ +choice_translation_locale +~~~~~~~~~~~~~~~~~~~~~~~~~ + +**type**: ``string`` or ``null`` **default**: ``null`` + +This option determines if the choice values should be translated into a different locale +than the current one. + +The values of the ``choice_translation_locale`` option can be ``null`` (reuse the current +translation locale) or a string which represents the exact translation locale to use.