title: Twig: show the name of the months based on the current locale
body: <p>I'm just trying to show the name of the months based on the current locale.</p>
  
  <pre><code>{{ event.date|date('F') }}
  </code></pre>
  
  <p>but the months are always shown in english...</p>
  
  <p>I have tried this code below I found <a href="https://github.com/fabpot/Twig/issues/378">here</a>, but the result is the same...</p>
  
  <pre><code>class Helper_Twig extends Twig_Extension
  {
      public function getFilters()
      {
          return array(
              'datetime' =&gt; new Twig_Filter_Method($this, 'datetime')
          );
      }
  
      public function datetime($d, $format = "%B %e")
      {
          if ($d instanceof \DateTime) {
              $d = $d-&gt;getTimestamp();
          }
  
          return strftime($format, $d);
      }
  
      public function getName()
      {
          return 'Helper';
      }
  }
  </code></pre>
  
  <p><strong>NOTE:</strong> In the controller I'm checking the current locale using <code>$request-&gt;getLocale</code> and it corresponds to the locale parameter I'm switching in parameters.yml.</p>
  
  <p>What is the problem?</p>