dngettext

Name

dngettext -- perform lookup in message catalog for the current LC_MESSAGES locale

Synopsis

#include <libintl.h>
            

extern char *dngettext(const char *domainname , const char *msgid1 , const char *msgid2 , unsigned long int n );

Description

dngettext is a plural version of dgettext. (See dgettext for more information.)

Parameters

domainname

dngettext applies domainname to the currently active LC_MESSAGE locale. This usage is equivalent in syntax and meaning to the textdomain function's application of domainname , except that the selection of the domain in dngettext is valid only for the duration of the call.

msgid1

a NULL-terminated string to be matched in the catalogue with respect to a specific domain and the current locale. If the value of n is 1 and no message catalogs containing a translation for msgid1 are found, msgid1 is returned.

msgid2

a NULL-terminated string to be returned if the value of n is not 1 and no message catalogs are found.

n

determines which plural form is returned, in a language and message catalog dependent way.

Return Value

On success of a msgid1 query, the translated NULL-terminated string is returned. On error, the original msgid1 or msgid2 is returned, according to n .

Errors

dcngettext will not modify the errno global variable.

See Also

gettext, dgettext, ngettext, dngettext, dcgettext, dcngettext, textdomain, bindtextdomain, bind_textdomain_codeset

Retour en haut de la page
Mandragor.org - Version 8.3