As the title says: How would you translate…
_n()
_n_noop()
_nc()
_nx()
_nx_noop()
…in your .mo files?
As the title says: How would you translate…
_n()
_n_noop()
_nc()
_nx()
_nx_noop()
…in your .mo files?
Open your file in PoEdit.
Go to “Catalogue” » “Settings“
Fill in “Language” and “Country” 1).
Fill “Pluralform” (last field).
// For 2 plural forms
nplurals=2; plural=n != 1;
// For 3 plural forms (for e.g. russian), use:
nplurals=3; plural=(n%10==1 && n%100!=11) ? 0 : ((n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20)) ? 1 : 2);
// For 4 plural forms (for e.g. slovenian), use:
nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;
Go to the 3rd tab “Keywords“.
Add the following list. 2) Of course you have to extend to 1,2,3
for languages with three different plural forms and so on.
_n:1,2
_n_noop:1,2
_nx:1,2
_nx_noop:1,2
Links
Plugins
This Plugin by (again) Heiko Rabe does a pretty good job with helping translating your plugin.
Footnotes
1) For e.g. UK & U.S.A. have different forms of “colour/color”
2) Every row goes in a single (new) entry.