Overview

MX Plural allows you to choose correct plural form of words in different languages. Languages Supported: Afrikaans(af) Albanian(sq) Arabic(ar) Belarusian(be) Bosnian(bs) Bulgarian(bz) Chinese(tw) Croatian(hr) Czech(cz) Dutch(nl) English(nl) Estonian(ee) Farsi(fa) French(fr) German(de) Greek(gr) Hebrew(il) Icelandic(is) Irish(ie) Italian(it) Japan(ja) Kazakh(kz) Latvian(lv) Lithuanian(lt) Malay(my) Mongolian(mn) Polskiy(pl) Russian(ru) Slovak(sk) Spanish(es) Turkish(tr) Ukrainian(ua) Vietnamese(vn) Welsh(cy)

Requirements

  1. ExpressionEngine 2

Example

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">{exp</span><span style="color: #007700">:</span><span style="color: #0000BB">mx_plural&nbsp;lang_id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"fr"&nbsp;</span><span style="color: #0000BB">qty&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"1"&nbsp;</span><span style="color: #0000BB">str&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"maison|maisons"</span><span style="color: #0000BB">}&nbsp;</span>
</span>
</code></div>

  output: <b>maison</b>
<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">{exp</span><span style="color: #007700">:</span><span style="color: #0000BB">mx_plural&nbsp;lang_id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"fr"&nbsp;</span><span style="color: #0000BB">qty&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"5"&nbsp;</span><span style="color: #0000BB">str&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"maison|maisons"&nbsp;</span><span style="color: #0000BB">pattern&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"%d&nbsp;%w"</span><span style="color: #0000BB">}&nbsp;</span>
</span>
</code></div>

  output: 5 <b>maisons</b>
 
<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">{exp</span><span style="color: #007700">:</span><span style="color: #0000BB">mx_plural&nbsp;lang_id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"pl"&nbsp;</span><span style="color: #0000BB">qty&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"5"&nbsp;</span><span style="color: #0000BB">str</span><span style="color: #007700">=</span><span style="color: #DD0000">"dom|domy|domow"&nbsp;</span><span style="color: #0000BB">pattern&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"%d&nbsp;%w"&nbsp;</span><span style="color: #0000BB">}&nbsp;</span>
</span>
</code></div>

  output: 5 <b>domow</b>
<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">{exp</span><span style="color: #007700">:</span><span style="color: #0000BB">mx_plural&nbsp;lang_id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"pl"&nbsp;</span><span style="color: #0000BB">qty&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"1"&nbsp;</span><span style="color: #0000BB">str&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"dom|domy|domow"&nbsp;</span><span style="color: #0000BB">pattern&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"%d&nbsp;%w"</span><span style="color: #0000BB">}&nbsp;</span>
</span>
</code></div>

  output: 1 <b>dom</b>
<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">{exp</span><span style="color: #007700">:</span><span style="color: #0000BB">mx_plural&nbsp;lang_id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"pl"&nbsp;</span><span style="color: #0000BB">qty&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"24"&nbsp;</span><span style="color: #0000BB">str&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"dom|domy|domow"&nbsp;</span><span style="color: #0000BB">pattern&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"%d&nbsp;%w"</span><span style="color: #0000BB">}&nbsp;</span>
</span>
</code></div>

  output: 24 <b>domy </b>
is this code works? [ Test it NOW! ]