Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
ngettext(3)
Edit
PageHistory
Diff
Info
LikePages
NGETTEXT !!!NGETTEXT NAME SYNOPSIS DESCRIPTION RETURN VALUE ERRORS BUGS SEE ALSO ---- !!NAME ngettext, dngettext, dcngettext - translate message and choose plural form !!SYNOPSIS __#include __ ''msgid''__, const char *__ ''msgid_plural''__, unsigned long int__ ''n''__); char * dngettext (const char *__ ''domainname''__, const char *__ ''msgid''__, const char *__ ''msgid_plural''__, unsigned long int__ ''n''__); char * dcngettext (const char *__ ''domainname''__, const char *__ ''msgid''__, const char *__ ''msgid_plural''__, unsigned long int__ ''n''__, int__ ''category''__); __ !!DESCRIPTION The __ngettext__, __dngettext__ and __dcngettext__ functions attempt to translate a text string into the user's native language, by looking up the appropriate plural form of the translation in a message catalog. Plural forms are grammatical variants depending on the a number. Some languages have two forms, called singular and plural. Other languages have three forms, called singular, dual and plural. There are also languages with four forms. The __ngettext__, __dngettext__ and __dcngettext__ functions work like the __gettext__, __dgettext__ and __dcgettext__ functions, respectively. Additionally, they choose the appropriate plural form, which depends on the number ''n'' and the language of the message catalog where the translation was found. In the msgid'', the __ngettext__, __dngettext__ and __dcngettext__ functions return ''msgid'' if ''n'' == 1, or ''msgid_plural'' if ''n'' != 1. !!RETURN VALUE If a translation was found in one of the specified catalogs, the appropriate plural form is converted to the locale's codeset and returned. The resulting string is statically allocated and must not be modified or freed. Otherwise ''msgid'' or ''msgid_plural'' is returned, as described above. !!ERRORS __errno__ is not modified. !!BUGS The return type ought to be __const char *__, but is __char *__ to avoid warnings in C code predating ANSI C. !!SEE ALSO gettext(3), dgettext(3), dcgettext(3) ----
5 pages link to
ngettext(3)
:
textdomain(3)
bind_textdomain_codeset(3)
bindtextdomain(3)
gettext(3)
Man3n
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.