8000 feature #18963 Add `AppVariable::getEnabledLocales()` (alexandre-daub… · symfony/symfony-docs@3081c70 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3081c70

Browse files
committed
feature #18963 Add AppVariable::getEnabledLocales() (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- Add `AppVariable::getEnabledLocales()` Fix * #18957 Commits ------- b769bf2 [TwigBridge] Add `AppVariable::getEnabledLocales()`
2 parents 13f9e5b + b769bf2 commit 3081c70

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