+2006-08-17 Bruno Haible <bruno@clisp.org>
+
+ * gettext.texi (Plural Forms): Mention the use of ngettext with a
+ singular format string that doesn't need as many format arguments as
+ the plural string.
+ Suggested by Paul Eggert <eggert@cs.ucla.edu>.
+
2006-08-16 Bruno Haible <bruno@clisp.org>
- * gettext.texi (Plural forms): Document how to deal with bignums,
+ * gettext.texi (Plural Forms): Document how to deal with bignums,
negative numbers and floating-point numbers.
Suggested by Paul Eggert <eggert@cs.ucla.edu>.
@code{printf} function as well. It is not sufficient to pass it only to
@code{ngettext}.
+In the English singular case, the number -- always 1 -- can be replaced with
+"one":
+
+@smallexample
+printf (ngettext ("One file removed", "%d files removed", n), n);
+@end smallexample
+
+@noindent
+This works because the @samp{printf} function discards excess arguments that
+are not consumed by the format string.
+
It is also possible to use this function when the strings don't contain a
cardinal number: