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
This commit is contained in:
Václav Slavík 2003-10-04 22:43:46 +00:00
parent 2bf8cafb21
commit 6f80247a06
2 changed files with 13 additions and 0 deletions

View File

@ -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}

View File

@ -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