0

Generally, after a user is logged, the contents of the site are shown in the locale that the user chooses from an hypothetical account settings.

Where is that locale usually stored? In what way symfony2 handle it?

Im using FOSUserBundle, I expected a column called locale exists in fos_user table..

j0k
  • 22,600
  • 28
  • 79
  • 90
tirenweb
  • 30,963
  • 73
  • 183
  • 303

1 Answers1

3

In symfony 2.0 locale is stored in session: http://symfony.com/doc/current/book/translation.html#handling-the-user-s-locale

in symfony 2.1 locale is stored in request (take from request): http://symfony.com/doc/master/book/translation.html#handling-the-user-s-locale

but you can change default behavior by impelementing kernel.event_listener

I found out that someone even did it for FOSUserBundle: https://gist.github.com/1670163 maybe it helps

l3l0
  • 3,363
  • 20
  • 19