Skip to content

Commit 207f2f0

Browse files
committed
feature #4711 [Reference] Add default_locale config description (xelaris)
This PR was merged into the 2.3 branch. Discussion ---------- [Reference] Add default_locale config description | Q | A | ------------- | --- | Doc fix? | no | New docs? | yes | Applies to | all | Fixed tickets | Commits ------- 7ae3489 [Reference] Add default_locale config description
2 parents 1b0fe77 + 7ae3489 commit 207f2f0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

reference/configuration/framework.rst

+14-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Configuration
1919
* `http_method_override`_
2020
* `ide`_
2121
* `test`_
22+
* `default_locale`_
2223
* `trusted_proxies`_
2324
* `form`_
2425
* enabled
@@ -76,8 +77,8 @@ http_method_override
7677
This determines whether the ``_method`` request parameter is used as the intended
7778
HTTP method on POST requests. If enabled, the
7879
:method:`Request::enableHttpMethodParameterOverride <Symfony\\Component\\HttpFoundation\\Request::enableHttpMethodParameterOverride>`
79-
gets called automatically. It becomes the service container parameter named
80-
``kernel.http_method_override``. For more information, see
80+
method gets called automatically. It becomes the service container parameter
81+
named ``kernel.http_method_override``. For more information, see
8182
:doc:`/cookbook/routing/method_parameters`.
8283

8384
ide
@@ -151,6 +152,17 @@ This setting should be present in your ``test`` environment (usually via
151152

152153
.. _reference-framework-trusted-proxies:
153154

155+
default_locale
156+
~~~~~~~~~~~~~~
157+
158+
**type**: ``string`` **default**: ``en``
159+
160+
The default locale is used if no ``_locale`` routing parameter has been set. It
161+
becomes the service container parameter named ``kernel.default_locale`` and it
162+
is also available with the
163+
:method:`Request::getDefaultLocale <Symfony\\Component\\HttpFoundation\\Request::getDefaultLocale>`
164+
method.
165+
154166
trusted_proxies
155167
~~~~~~~~~~~~~~~
156168

0 commit comments

Comments
 (0)