title: Symfony2 : use translator in a twig filter extension
body: <p>I'm trying to use translation in a custom twig filter like this</p>
  
  <pre><code>public function formatTime($timestamp)
  {
      $str = date('j %\m%',$timestamp);
      $str = str_replace($str, '%m%', $this-&gt;get('translator')-&gt;trans('month'.date('m', $timestamp) ) );
      return $str;
  }
  </code></pre>
  
  <p>offcourse get is unknown function. 
  Should I make my Extension aware of the environment or simply request translation class to make it available ? </p>