File tree 2 files changed +8
-0
lines changed 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -380,12 +380,18 @@ gives you access to these variables:
380
380
``app.current_route_parameters ``
381
381
An array with the parameters passed to the route of the current request or an
382
382
empty array if no request is available (equivalent to ``app.request.attributes.get('_route_params') ``)
383
+ ``app.locale ``
384
+ The locale used in the current :ref: `locale switcher <locale-switcher >` context.
383
385
384
386
.. versionadded :: 6.2
385
387
386
388
The ``app.current_route `` and ``app.current_route_parameters `` variables
387
389
were introduced in Symfony 6.2.
388
390
391
+ .. versionadded :: 6.3
392
+
393
+ The ``app.locale `` variable was introduced in Symfony 6.3.
394
+
389
395
In addition to the global ``app `` variable injected by Symfony, you can also
390
396
inject variables automatically to all Twig templates as explained in the next
391
397
section.
Original file line number Diff line number Diff line change @@ -988,6 +988,8 @@ checks translation resources for several locales:
988
988
add the missing translation to the log file. For details,
989
989
see :ref: `reference-framework-translator-logging `.
990
990
991
+ .. _locale-switcher :
992
+
991
993
Switch Locale Programmatically
992
994
------------------------------
993
995
You can’t perform that action at this time.
0 commit comments