title: Symfony 2.1 set locale
body: <p>Does anybody know how to set the locale in Symfony2.1?</p>
  
  <p>I am trying with:</p>
  
  <pre><code>$this-&gt;get('session')-&gt;set('_locale', 'en_US');
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$this-&gt;get('request')-&gt;setLocale('en_US');
  </code></pre>
  
  <p>but none of those has any effect, the devbar tells me:</p>
  
  <blockquote>
    <p>Session Attributes: No session attributes </p>
  </blockquote>
  
  <p>Anyway, it is always the fallback locale that is used, as defined in config.yml</p>
  
  <p>(PS: I am trying to set up the translation system as described <a href="http://symfony.com/doc/current/book/translation.html#book-translation-locale-url" rel="noreferrer">here</a></p>