8000 [TwigBridge] Add `AppVariable::getEnabledLocales()` · symfony/symfony-docs@b769bf2 · GitHub
[go: up one dir, main page]

Skip to content

Commit b769bf2

Browse files
[TwigBridge] Add AppVariable::getEnabledLocales()
1 parent bde97b5 commit b769bf2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

templates.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ gives you access to these variables:
382382
empty array if no request is available (equivalent to ``app.request.attributes.get('_route_params')``)
383383
``app.locale``
384384
The locale used in the current :ref:`locale switcher <locale-switcher>` context.
385+
``app.enabled_locales``
386+
The locales enabled in the application
385387

386388
.. versionadded:: 6.2
387389

@@ -392,6 +394,10 @@ gives you access to these variables:
392394

393395
The ``app.locale`` variable was introduced in Symfony 6.3.
394396

397+
.. versionadded:: 6.4
398+
399+
The ``app.enabled_locales`` variable was introduced in Symfony 6.4.
400+
395401
In addition to the global ``app`` variable injected by Symfony, you can also
396402
inject variables automatically to all Twig templates as explained in the next
397403
section.

0 commit comments

Comments
 (0)
0