From 9e3b313e799ad4ffc5d21d81d33cff186f43cef2 Mon Sep 17 00:00:00 2001
From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= <vslavik@fastmail.fm>
Date: Mon, 13 Oct 2003 21:37:02 +0000
Subject: [PATCH] gettext plural form docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/function.tex | 32 ++++++++++++++++++++++++++++++--
 docs/latex/wx/locale.tex   | 10 ++++++++--
 docs/latex/wx/ti18n.tex    |  2 +-
 3 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex
index d877862060..ca5b6d34c2 100644
--- a/docs/latex/wx/function.tex
+++ b/docs/latex/wx/function.tex
@@ -23,6 +23,7 @@ the corresponding topic.
 \helpref{IMPLEMENT\_CLASS}{implementclass}\\
 \helpref{IMPLEMENT\_DYNAMIC\_CLASS2}{implementdynamicclass2}\\
 \helpref{IMPLEMENT\_DYNAMIC\_CLASS}{implementdynamicclass}\\
+\helpref{ngettext}{ngettext}\\
 \helpref{wxCONCAT}{wxconcat}\\
 \helpref{WXDEBUG\_NEW}{debugnew}\\
 \helpref{WXTRACELEVEL}{tracelevel}\\
@@ -1395,6 +1396,22 @@ deleted with the {\it delete} operator.
 This function is deprecated, use \helpref{wxString}{wxstring} class instead.
 
 
+\membersection{ngettext}\label{ngettext}
+
+\func{const wxChar *}{ngettext}{\param{const char *}{str}, \param{const char *}{strPlural}, \param{size\_t }{n}}
+
+This macro expands into a call to plural form version of
+\helpref{wxGetTranslation}{wxgettranslation} 
+function, so it marks the message for the extraction by {\tt xgettext} just as
+\helpref{wxTRANSLATE}{wxtranslate} does, but also returns the translation of
+the string for the current locale during execution, either singular or plural
+form depending on the value of \arg{n}.
+
+\wxheading{See also}
+
+\helpref{\_}{underscore}
+
+
 \membersection{::wxGetTranslation}\label{wxgettranslation}
 
 \func{const char *}{wxGetTranslation}{\param{const char * }{str}}
@@ -1412,8 +1429,15 @@ as wxGetTranslation.
 
 The second form is used when retrieving translation of string that has
 different singular and plural form in English or different plural forms in some
-other language. \arg{strPlural} is plural form of the string in English and
-\arg{n} is used to determine the plural form.
+other language. It takes two extra arguments: \arg{str}
+parameter must contain the singular form of the string to be converted.
+It is also used as the key for the search in the catalog.
+The \arg{strPlural} parameter is the plural form (in English).
+The parameter \arg{n} is used to determine the plural form.  If no
+message catalog is found \arg{str} is returned if `n == 1',
+otherwise \arg{strPlural}. The \helpref{ngettext}{ngettext} macro is defined
+to do the same thing.
+See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling.
 
 \membersection{::wxIsEmpty}\label{wxisempty}
 
@@ -1607,6 +1631,10 @@ the string for the current locale during execution.
 
 Don't confuse this macro with \helpref{\_T()}{underscoret}!
 
+\wxheading{See also}
+
+\helpref{ngettext}{ngettext}
+
 
 
 \membersection{\_T}\label{underscoret}
diff --git a/docs/latex/wx/locale.tex b/docs/latex/wx/locale.tex
index 151f4c65e5..e550878563 100644
--- a/docs/latex/wx/locale.tex
+++ b/docs/latex/wx/locale.tex
@@ -485,8 +485,14 @@ a string is not found; use \helpref{wxLogNull}{wxlogoverview} to suppress it).
 
 The second form is used when retrieving translation of string that has
 different singular and plural form in English or different plural forms in some
-other language. \arg{szOrigString2} is plural form of the string in English and
-\arg{n} is used to determine the plural form.
+other language. It takes two extra arguments: \arg{szOrigString}
+parameter must contain the singular form of the string to be converted.
+It is also used as the key for the search in the catalog.
+The \arg{szOrigString2} parameter is the plural form (in English).
+The parameter \arg{n} is used to determine the plural form.  If no
+message catalog is found \arg{szOrigString} is returned if `n == 1',
+otherwise \arg{szOrigString2}.
+See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling.
 
 \wxheading{Remarks}
 
diff --git a/docs/latex/wx/ti18n.tex b/docs/latex/wx/ti18n.tex
index 8aaca5348e..fa23079d1c 100644
--- a/docs/latex/wx/ti18n.tex
+++ b/docs/latex/wx/ti18n.tex
@@ -32,7 +32,7 @@ The program i18n involves several steps:
 \begin{enumerate}\itemsep=0pt
 \item Translating the strings in the program text using 
 \helpref{wxGetTranslation}{wxgettranslation} or equivalently the 
-\helpref{\_()}{underscore} macro.
+\helpref{\_()}{underscore} and \helpref{ngettext}{ngettext} macros.
 \item Extracting the strings to be translated from the program: this uses the
 work done in the previous step because {\tt xgettext} program used for string
 extraction recognises the standard \_() as well as (using its {\tt -k} option)
-- 
2.50.0

