dcgettext

Name

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

Synopsis

#include <libintl.h>
#include <locale.h>

extern char *dcgettext(const char *domainname, const char *msgid, int category);

Description

dcgettext is a domain specified version of gettext.

Parameters

domainname

dcgettext 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 dcgettext is valid only for the duration of the call.

msgid

a NULL-terminated string to be matched in the catalogue with respect to a specific domain and the current locale.

category

category is used for retrieving messages string for other than LC_MESSAGES category. Available value for category are LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_MONETARY,LC_NUMERIC, and LC_TIME.

dcgettext(domainname, msgid, LC_MESSAGES) has the same specification as dgettext(domainname, msgid). Note that LC_ALL must not be used.

Return Value

On success, the translated NULL-terminated string is returned. On error, msgid is returned.

Errors

dcgettext will not modify the errno global variable.

See Also

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