*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> ngettext (3)              
Title
Content
Arch
Section
 

NGETTEXT(3)

Contents


NAME    [Toc]    [Back]

       ngettext,  dngettext,  dcngettext - translate message and choose plural
       form

SYNOPSIS    [Toc]    [Back]

       #include <libintl.h>

       char * ngettext (const char * 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    [Toc]    [Back]

       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 "C" locale, or if none of the used catalogs contain  a  translation
 for msgid, the ngettext, dngettext and dcngettext functions return
       msgid if n == 1, or msgid_plural if n != 1.

RETURN VALUE    [Toc]    [Back]

       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    [Toc]    [Back]

       errno is not modified.

BUGS    [Toc]    [Back]

       The return type ought to be const char *, but is char * to avoid  warnings
 in C code predating ANSI C.

SEE ALSO    [Toc]    [Back]

      
      
       gettext(3), dgettext(3), dcgettext(3)



GNU gettext 0.10.40		   May 2001			   NGETTEXT(3)
[ Back ]
 Similar pages
Name OS Title
gettext Linux translate message
st_strerror Tru64 translate a libst return code to a printable error message
ngettext Linux print out string using translation with singular/plural
gss_unwrap Tru64 Converts a protected message to a usable form.
SSL_set_ssl_method Tru64 Choose a new TLS/SSL method
SSL_CTX_set_ssl_version Tru64 Choose a new TLS/SSL method
SSL_get_ssl_method Tru64 Choose a new TLS/SSL method
SSL_set_ssl_method OpenBSD choose a new TLS/SSL method
SSL_CTX_set_ssl_version OpenBSD choose a new TLS/SSL method
SSL_get_ssl_method OpenBSD choose a new TLS/SSL method
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service