title: setting a placeholder attribute with translation in Symfony2 form input
body: <p>I am using FOSUserBundle for managing my users. In order to register user, I reused the form of the bundle which meets my needs. Nevertheless, I needed to set some attributes of my fields. This is was done easyly by twig like this:</p>
  
  <pre><code>    {{ form_widget(form.username, { 'attr': {'class': "span12",
          'placeholder': "Username"} }) }}
  </code></pre>
  
  <p>Now, my goal is to make automatic translation on my placeholder, so I proposed this code:</p>
  
  <pre><code>    {{ form_widget(form.username, { 'attr': {'class': "span12",
          'placeholder': "{{'security.login.usernameplaceholder'|trans}}"} }) }}
  </code></pre>
  
  <p>This previous code produced an input with placeholder value equal to <strong>{{'security.login.usernameplaceholder'|trans}}</strong></p>
  
  <p>To get rid of this problem, I tried to set variable for that but symfony generated an error!!!</p>
  
  <pre><code>    {% set usernameplaceholder = {{'security.login.usernameplaceholder'|trans}} %}
      {{ form_widget(form.username, { 'attr': {'class': "span12",
          'placeholder': usernameplaceholder} }) }}
  </code></pre>
  
  <p>Is there any proposition to solve this problem?</p>
  
  <p>Thanks,</p>