Skip to content

Commit fd9cdd1

Browse files
committed
Merge branch '7.4' into 8.0
* 7.4: [Routing] Initialize router.request_context's _locale parameter to %kernel.default_locale%
2 parents 4b4e960 + 5fdca73 commit fd9cdd1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

routing.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,6 +2325,18 @@ Now you'll get the expected results when generating URLs in your commands::
23252325
value, but you can change it with the ``asset.request_context.base_path``
23262326
and ``asset.request_context.secure`` container parameters.
23272327

2328+
.. note::
2329+
2330+
By default, routes generated outside the HTTP context use the
2331+
:ref:`default locale <config-framework-default_locale>` as the value of the
2332+
``_locale`` parameter. You can override this by providing a different value
2333+
for the ``_locale`` parameter when generating each route.
2334+
2335+
.. versionadded:: 7.4
2336+
2337+
The default locale is used as the value of the ``_locale`` parameter
2338+
starting from Symfony 7.4.
2339+
23282340
Checking if a Route Exists
23292341
~~~~~~~~~~~~~~~~~~~~~~~~~~
23302342

0 commit comments

Comments
 (0)