From 58f7dca669879c529822729a5d4f928ad771b859 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 17 Aug 2006 11:51:00 +0000 Subject: [PATCH] Mention the use of ngettext without cardinal numbers. --- gettext-tools/doc/ChangeLog | 6 ++++++ gettext-tools/doc/gettext.texi | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index 5ebe3b983..17aa8dce5 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,9 @@ +2006-08-16 Bruno Haible + + * gettext.texi (Plural Forms): Mention the use of ngettext without + cardinal numbers. + Reported by Arpad Biro . + 2006-08-08 Ralf Wildenhues * gettext.texi: Fix 2 typos. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index b49a05d55..cf7bec1a1 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -5198,6 +5198,17 @@ printf (ngettext ("%d file removed", "%d files removed", n), n); Please note that the numeric value @var{n} has to be passed to the @code{printf} function as well. It is not sufficient to pass it only to @code{ngettext}. + +It is also possible to use this function when the strings don't contain a +cardinal number: + +@smallexample +puts (ngettext ("Delete the selected file?", + "Delete the selected files?", + n)); +@end smallexample + +In this case the number @var{n} is only used to choose the plural form. @end deftypefun @deftypefun {char *} dngettext (const char *@var{domain}, const char *@var{msgid1}, const char *@var{msgid2}, unsigned long int @var{n}) @@ -5257,7 +5268,7 @@ The following rules are known at this point. The language with families are listed. But this does not necessarily mean the information can be generalized for the whole family (as can be easily seen in the table below).@footnote{Additions are welcome. Send appropriate information to -@email{bug-glibc-manual@@gnu.org}.} +@email{bug-gnu-gettext@@gnu.org} and @email{bug-glibc-manual@@gnu.org}.} @table @asis @item Only one form: -- 2.47.3