title: Twig to XLIFF translate in Symfony2
body: <p>I haven't understood exactly how the xliff and twig files work together with Symfony2.</p>
  
  <p>In my twig I wrote this</p>
  
  <pre><code>&lt;article&gt;{{ 'bye'|trans }}&lt;/article&gt;
  </code></pre>
  
  <p>and the it xliff file "<em>Resurces/translations/messages.it.xliff</em>" (this is just a snippet)</p>
  
  <pre><code>&lt;trans-unit id="2" datatype="plaintext"&gt;
      &lt;source xml:lang="en"&gt;Bye&lt;/source&gt;
      &lt;target xml:lang="it"&gt;Ciao&lt;/target&gt;
  &lt;/trans-unit&gt;
  </code></pre>
  
  <p>It works good and when the url language-segment is "it", it translates in it language (Ciao).</p>
  
  <p>Instead, How I can make a similar thing without fall in error?</p>
  
  <pre><code>&lt;trans-unit id="2" datatype="plaintext"&gt;
      &lt;source xml:lang="en"&gt;&lt;a href="link.html"&gt;Bye&lt;/a&gt;&lt;/source&gt;
      &lt;target xml:lang="it"&gt;&lt;a href="link.html"&gt;Ciao&lt;/a&gt;&lt;/target&gt;
  &lt;/trans-unit&gt;
  </code></pre>
  
  <p>Above there's just an example of what I would like to do. I sow a lot of stuff about this matter but I'm still confused.</p>
  
  <p>The problem is when I should translate a string with HTML tags inside.</p>