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

locale listener doc ./. example discrepancy #9164

Closed
Labels
Status: Needs ReviewactionableClear and specific issues ready for anyone to take them.buggood first issueIdeal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.
Milestone
@kaiwa

Description

@kaiwa

https://symfony.com/doc/master/translation/locale.html

The custom listener must be calledbefore LocaleListener, which initializes the locale based on the current request. To do so, set your listener priority to a higher value than LocaleListener priority (which you can obtain running the debug:event kernel.request command).

And then in the linked example:

https://symfony.com/doc/master/session/locale_sticky_session.html

publicstaticfunctiongetSubscribedEvents()    {returnarray(// must be registered after the default Locale listener            KernelEvents::REQUEST =>array(array('onKernelRequest',15)),        );    }

Documentation says (in bold) the custom listener must be registeredbefore the framework listener, the inline doc in the example saysafter, which is exactly the opposite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs ReviewactionableClear and specific issues ready for anyone to take them.buggood first issueIdeal for your first contribution! (some Symfony experience may be required)hasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp