From 6f80247a06535977aec8e9f0b8cf24104473fbb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 4 Oct 2003 22:43:46 +0000 Subject: [PATCH] added gettext plural forms support (patch #785660 with modifications) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/function.tex | 6 ++++++ docs/latex/wx/locale.tex | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index b26bd9d119..d877862060 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -1399,6 +1399,8 @@ This function is deprecated, use \helpref{wxString}{wxstring} class instead. \func{const char *}{wxGetTranslation}{\param{const char * }{str}} +\func{const char *}{wxGetTranslation}{\param{const char * }{str}, \param{const char * }{strPlural}, \param{size\_t }{n}} + This function returns the translation of string {\it str} in the current \helpref{locale}{wxlocale}. If the string is not found in any of the loaded message catalogs (see \helpref{internationalization overview}{internationalization}), the @@ -1408,6 +1410,10 @@ is used very often, an alternative (and also common in Unix world) syntax is provided: the \helpref{\_()}{underscore} macro is defined to do the same thing 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. \membersection{::wxIsEmpty}\label{wxisempty} diff --git a/docs/latex/wx/locale.tex b/docs/latex/wx/locale.tex index ed44298e9e..151f4c65e5 100644 --- a/docs/latex/wx/locale.tex +++ b/docs/latex/wx/locale.tex @@ -474,6 +474,8 @@ the Init() function). \constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szDomain = NULL}} +\constfunc{const char*}{GetString}{\param{const char }{*szOrigString}, \param{const char }{*szOrigString2}, \param{size\_t }{n}, \param{const char }{*szDomain = NULL}} + Retrieves the translation for a string in all loaded domains unless the szDomain parameter is specified (and then only this catalog/domain is searched). @@ -481,6 +483,11 @@ Returns original string if translation is not available (in this case an error message is generated the first time 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. + \wxheading{Remarks} Domains are searched in the last to first order, i.e. catalogs -- 2.45.2