+2001-03-15 Bruno Haible <haible@clisp.cons.org>
+
+ * gettext.texi (Plural forms): Clarify the syntax of the plural form
+ information in the header entry. Always terminate it with a semicolon.
+
2001-03-09 Bruno Haible <haible@clisp.cons.org>
* Makefile.am (MAKEINFO): Add 'env', to avoid shell syntax error in
bit of information is provided.
The information about the plural form selection has to be stored in the
-header entry (the one with the empty @code{msgid} string). There should
-be something like:
+header entry of the PO file (the one with the empty @code{msgid} string).
+The plural form information looks like this:
@smallexample
- nplurals=2; plural=n == 1 ? 0 : 1
+ Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;
@end smallexample
The @code{nplurals} value must be a decimal number which specifies how
would look like this:
@smallexample
-nplurals=1; plural=0
+Plural-Forms: nplurals=1; plural=0;
@end smallexample
@noindent
is using. A header entry would look like this:
@smallexample
-nplurals=2; plural=n != 1
+Plural-Forms: nplurals=2; plural=n != 1;
@end smallexample
(Note: this uses the feature of C expressions that boolean expressions
Exceptional case in the language family. The header entry would be:
@smallexample
-nplurals=2; plural=n>1
+Plural-Forms: nplurals=2; plural=n>1;
@end smallexample
@noindent
The header entry would be:
@smallexample
-nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2
+Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;
@end smallexample
@noindent
The header entry would look like this:
@smallexample
-nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 ? 1 : 2
+Plural-Forms: nplurals=3; \
+ plural=n==1 ? 0 : n%10>=2 && n%10<=4 ? 1 : 2;
@end smallexample
@noindent
The header entry would look like this:
@smallexample
-nplurals=3; plural=n==1 ? 0 : \
- n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2
+Plural-Forms: nplurals=3; \
+ plural=n==1 ? 0 : \
+ n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
@end smallexample
(Continuation in the next line is possible.)
The header entry would look like this:
@smallexample
-nplurals=4; plural=n==1 ? 0 : n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3
+Plural-Forms: nplurals=4; \
+ plural=n==1 ? 0 : \
+ n%10==2 ? 1 : n%10==3 || n%10==4 ? 2 : 3;
@end smallexample
@noindent