Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Twig] Addapp.locale documentation#18190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
OskarStark merged 1 commit intosymfony:6.3fromSVillette:twig-app-variable-locale
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletionstemplates.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -380,12 +380,18 @@ gives you access to these variables:
``app.current_route_parameters``
An array with the parameters passed to the route of the current request or an
empty array if no request is available (equivalent to ``app.request.attributes.get('_route_params')``)
``app.locale``
The locale used in the current:ref:`locale switcher<locale-switcher>` context.

..versionadded::6.2

The ``app.current_route`` and ``app.current_route_parameters`` variables
were introduced in Symfony 6.2.

..versionadded::6.3

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

In addition to the global ``app`` variable injected by Symfony, you can also
inject variables automatically to all Twig templates as explained in the next
section.
Expand Down
2 changes: 2 additions & 0 deletionstranslation.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -988,6 +988,8 @@ checks translation resources for several locales:
add the missing translation to the log file. For details,
see :ref:`reference-framework-translator-logging`.

.. _locale-switcher:

Switch Locale Programmatically
------------------------------

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp