title: Soanta Admin Bundle Locale
body: <p>I have a problem with translation. I use</p>
  
  <ul>
  <li>symfony 2.7</li>
  <li>sonata admin-bundle 2.3</li>
  </ul>
  
  <p>I have create the interactive login listener, when the user log in the application I get the user locale and set the session _locale, but this is ignore in sonata.</p>
  
  <p>Listener is</p>
  
  <pre><code>class UserLocaleListener {
  
   /**
    * @var Session
    */
  private $container;
  
  
  public function __construct(Session $session)
  {
      $this-&gt;session = $session;
  }
  
  public function onInteractiveLogin(InteractiveLoginEvent $event)
  {
      $request = $event-&gt;getRequest();
  
      $user = $event-&gt;getAuthenticationToken()-&gt;getUser();
  
  
      if (null !== $user-&gt;getLocale()) {
          $this-&gt;session-&gt;set('_locale', $user-&gt;getLocale());
          //$request-&gt;setLocale($user-&gt;getLocale());
          var_dump($request-&gt;getSession()-&gt;get('_locale'));
      }
    }
  }
  </code></pre>
  
  <p>in service.yml add</p>
  
  <pre><code>app.user_locale_listener:
      class: xxxxxx\xxxxxxxx\EventListener\UserLocaleListener
      arguments: ["@session"]
      tags:
          - { name: kernel.event_listener, event: security.interactive_login,       method: onInteractiveLogin }
  </code></pre>
  
  <p>Where is my mistake ?</p>