title: Symfony2, Sonata : translate and show translated roles name
body: <p>The first step is more about Symfony2,</p>
  
  <p>I have different Roles :</p>
  
  <pre><code>role_hierarchy:
      ROLE_INVESTOR: [ROLE_USER]
      ROLE_PROJECT_OWNER: [ROLE_USER]
      ROLE_ADMIN: [ROLE_USER, ROLE_SONATA_ADMIN]
      ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_SONATA_ADMIN, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH, SONATA]
  </code></pre>
  
  <p>I would like a french translation for each of them.</p>
  
  <p>Either using roles.fr.yml, roles.fr.xml or roles.fr.xliff (not sure which one has to be used).</p>
  
  <p>this is my actual yml : </p>
  
  <pre><code>'ROLE_PROJECT_OWNER': Porteur de projet
  'ROLE_INVESTOR': Investisseur
  'ROLE_USER': Utilisateur
  </code></pre>
  
  <p>or xliff :</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"&gt;
      &lt;file source-language="en" datatype="plaintext" original="" &gt;
          &lt;body&gt;
              &lt;trans-unit id="ROLE_PROJECT_OWNER"&gt;
                  &lt;source&gt;ROLE_PROJECT_OWNER&lt;/source&gt;
                  &lt;target&gt;Porteur de projet&lt;/target&gt;
              &lt;/trans-unit&gt;
          &lt;/body&gt;
      &lt;/file&gt;
  &lt;/xliff&gt;
  </code></pre>
  
  <p>(Both have not been tested)</p>
  
  <p>Then i would like to show them in Sonata Admin, for now it is not user friendly at all :</p>
  
  <p><img src="https://i.stack.imgur.com/UFKRq.png" alt="Roles"></p>
  
  <p>This is how they are "auto" listed in this part :</p>
  
  <pre><code>/**
   * {@inheritdoc}
   */
  protected function configureListFields(ListMapper $listMapper)
  {
      $listMapper
          -&gt;addIdentifier('username')
          -&gt;add('email')
          -&gt;add('enabled', null, array('editable' =&gt; true))
          -&gt;add('locked', null, array('editable' =&gt; true))
          -&gt;add('roles', null, array('editable' =&gt; true))
          -&gt;add('createdAt')
          -&gt;add('_action', 'actions', array(
              'actions' =&gt; array(
                  'show' =&gt; array(),
                  'edit' =&gt; array(),
                  'delete' =&gt; array(),
              )
          ))
      ;
  }
  </code></pre>
  
  <p>So it is not obvious how to add their related translations.</p>
  
  <p>Any ideas how to do?</p>
  
  <p><strong>UPDATE :</strong></p>
  
  <p>I managed to have something more readable but not yet translated using custom template (<a href="http://sonata-project.org/bundles/doctrine-orm-admin/master/doc/reference/list_field_definition.html" rel="nofollow noreferrer">Sonata Doc</a>).</p>
  
  <pre><code>{% block field %}
  &lt;div&gt;
      {% for role in object.roles %}
      &lt;strong&gt;{{ role }}&lt;/strong&gt; &lt;br/&gt;
      {% endfor %}
  &lt;/div&gt;
  {% endblock %}
  </code></pre>