Soanta Admin Bundle Locale

后端 未结 1 1568
一个人的身影
一个人的身影 2021-01-28 08:52

I have a problem with translation. I use

  • symfony 2.7
  • sonata admin-bundle 2.3

I have create the interactive login listener, when the user lo

相关标签:
1条回答
  • 2021-01-28 09:03

    the locale is set on the request, and will not "stick" , so each request it will be the default again, unless you do something like this:

    http://symfony.com/doc/current/cookbook/session/locale_sticky_session.html

    Wich will on each request, take the locale from the session, and set it on the current request.

    (make sure that LocaleListener has a lower priority then your UserLocaleListener, so that it runs after it)

    0 讨论(0)
提交回复
热议问题