title: Translate messages inside twig in symfony2
body: <p>I'm trying to access to the translations via twig.</p>
  
  <p>For example, I have the name of my application inside my <code>Resources/translations/messages.de.yml</code> and <code>Resources/translations/messages.en.yml</code></p>
  
  <p>My controller does only a render of the twig file.</p>
  
  <p>And inside my twig-file I want to access to the application.name property which is defined inside the messages-file (yml)</p>
  
  <p>How can I access to this property to get the application name (let's say it contains some language-specific information)</p>
  
  <p>I tried these methods, and failed:</p>
  
  <ul>
  <li><code>{{ application.name }}</code><br>
  <ul>
  <li>Looks more like for variables which have been sent through the controller, I've got an error, that the variable 'application' was not found</li>
  </ul></li>
  <li><code>{% trans% } application.name {% endtrans %}</code>
  <ul>
  <li>displays application.name</li>
  </ul></li>
  <li><code>{% trans% } 'application.name' {% endtrans %}</code>
  <ul>
  <li>displays 'application.name'</li>
  </ul></li>
  </ul>