title: How do I create a plural translation using Twig and the i18n extension?
body: <p>I'm using the Slim PHP framework with Twig and the Twig extension i18n. I need to create a plural translation that displays the number of messages in an array. I'm using a text editor to create the <code>.po</code> file and Poedit to compile it to a <code>.mo</code> file.</p>
  
  <p>Here's my template:</p>
  
  <pre><code>        {% set count=messages|length %}
          {% trans %}
              Showing the last message.
          {% plural count %}
              Showing the last {{count}} messages.
          {% endtrans %}&lt;br&gt;
  </code></pre>
  
  <p>And here's my <code>.po</code> file (for Swedish translation):</p>
  
  <pre><code>msgid "Showing the last message."
  msgid_plural "Showing the last %count messages."
  msgstr[0] "Visar det senaste meddelandet."
  msgstr[1] "Visar de %count senaste meddelandena."
  </code></pre>
  
  <p>This doesn't work, it gives me </p>
  
  <pre><code>Visar de %count senaste meddelandena.
  </code></pre>
  
  <p>even when <code>count</code> is 16.</p>
  
  <p>Where am I going wrong? </p>