- For instance, I'm used to using this:
- Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : \
- n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
- but it fails with PHP (it sets $plural=2 instead of 0 for $n==1).
-
- The fix is usually simple, but I'm lazy to go into the details of
- PHP operator precedence, and maybe try to fix it. In here, I had
- to put everything after the first ':' in parenthesis:
- Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : \
- (n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);
- That works, and I'm satisfied.