1*946379e7Schristos<html> 2*946379e7Schristos<head> 3*946379e7Schristos<meta name="generator" content="groff -Thtml, see www.gnu.org"> 4*946379e7Schristos<meta name="Content-Style" content="text/css"> 5*946379e7Schristos<title>NGETTEXT</title> 6*946379e7Schristos</head> 7*946379e7Schristos<body> 8*946379e7Schristos 9*946379e7Schristos<h1 align=center>NGETTEXT</h1> 10*946379e7Schristos<a href="#NAME">NAME</a><br> 11*946379e7Schristos<a href="#SYNOPSIS">SYNOPSIS</a><br> 12*946379e7Schristos<a href="#DESCRIPTION">DESCRIPTION</a><br> 13*946379e7Schristos<a href="#RETURN VALUE">RETURN VALUE</a><br> 14*946379e7Schristos<a href="#ERRORS">ERRORS</a><br> 15*946379e7Schristos<a href="#BUGS">BUGS</a><br> 16*946379e7Schristos<a href="#SEE ALSO">SEE ALSO</a><br> 17*946379e7Schristos 18*946379e7Schristos<hr> 19*946379e7Schristos<!-- Creator : groff version 1.17 --> 20*946379e7Schristos<a name="NAME"></a> 21*946379e7Schristos<h2>NAME</h2> 22*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 23*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 24*946379e7Schristos<tr valign="top" align="left"> 25*946379e7Schristos<td width="10%"></td><td width="90%"> 26*946379e7Schristosngettext, dngettext, dcngettext - translate message and choose plural form</td></table> 27*946379e7Schristos<a name="SYNOPSIS"></a> 28*946379e7Schristos<h2>SYNOPSIS</h2> 29*946379e7Schristos 30*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 31*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 32*946379e7Schristos<tr valign="top" align="left"> 33*946379e7Schristos<td width="10%"></td><td width="90%"> 34*946379e7Schristos<pre><b>#include <libintl.h> 35*946379e7Schristos 36*946379e7Schristoschar * ngettext (const char *</b> <i>msgid</i><b>, const char *</b> <i>msgid_plural</i><b>, 37*946379e7Schristos unsigned long int</b> <i>n</i><b>); 38*946379e7Schristoschar * dngettext (const char *</b> <i>domainname</i><b>, 39*946379e7Schristos const char *</b> <i>msgid</i><b>, const char *</b> <i>msgid_plural</i><b>, 40*946379e7Schristos unsigned long int</b> <i>n</i><b>); 41*946379e7Schristoschar * dcngettext (const char *</b> <i>domainname</i><b>, 42*946379e7Schristos const char *</b> <i>msgid</i><b>, const char *</b> <i>msgid_plural</i><b>, 43*946379e7Schristos unsigned long int</b> <i>n</i><b>, int</b> <i>category</i><b>); 44*946379e7Schristos</b></pre></td></table> 45*946379e7Schristos<a name="DESCRIPTION"></a> 46*946379e7Schristos<h2>DESCRIPTION</h2> 47*946379e7Schristos 48*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 49*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 50*946379e7Schristos<tr valign="top" align="left"> 51*946379e7Schristos<td width="10%"></td><td width="90%"> 52*946379e7SchristosThe <b>ngettext</b>, <b>dngettext</b> and <b>dcngettext</b> 53*946379e7Schristosfunctions attempt to translate a text string into the user's 54*946379e7Schristosnative language, by looking up the appropriate plural form 55*946379e7Schristosof the translation in a message catalog.</td></table> 56*946379e7Schristos 57*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 58*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 59*946379e7Schristos<tr valign="top" align="left"> 60*946379e7Schristos<td width="10%"></td><td width="90%"> 61*946379e7SchristosPlural forms are grammatical variants depending on the a 62*946379e7Schristosnumber. Some languages have two forms, called singular and 63*946379e7Schristosplural. Other languages have three forms, called singular, 64*946379e7Schristosdual and plural. There are also languages with four 65*946379e7Schristosforms.</td></table> 66*946379e7Schristos 67*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 68*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 69*946379e7Schristos<tr valign="top" align="left"> 70*946379e7Schristos<td width="10%"></td><td width="90%"> 71*946379e7SchristosThe <b>ngettext</b>, <b>dngettext</b> and <b>dcngettext</b> 72*946379e7Schristosfunctions work like the <b>gettext</b>, <b>dgettext</b> and 73*946379e7Schristos<b>dcgettext</b> functions, respectively. Additionally, they 74*946379e7Schristoschoose the appropriate plural form, which depends on the 75*946379e7Schristosnumber <i>n</i> and the language of the message catalog 76*946379e7Schristoswhere the translation was found.</td></table> 77*946379e7Schristos 78*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 79*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 80*946379e7Schristos<tr valign="top" align="left"> 81*946379e7Schristos<td width="10%"></td><td width="90%"> 82*946379e7SchristosIn the "C" locale, or if none of the used catalogs 83*946379e7Schristoscontain a translation for <i>msgid</i>, the <b>ngettext</b>, 84*946379e7Schristos<b>dngettext</b> and <b>dcngettext</b> functions return 85*946379e7Schristos<i>msgid</i> if <i>n</i> == 1, or <i>msgid_plural</i> if 86*946379e7Schristos<i>n</i> != 1.</td></table> 87*946379e7Schristos<a name="RETURN VALUE"></a> 88*946379e7Schristos<h2>RETURN VALUE</h2> 89*946379e7Schristos 90*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 91*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 92*946379e7Schristos<tr valign="top" align="left"> 93*946379e7Schristos<td width="10%"></td><td width="90%"> 94*946379e7SchristosIf a translation was found in one of the specified catalogs, 95*946379e7Schristosthe appropriate plural form is converted to the locale's 96*946379e7Schristoscodeset and returned. The resulting string is statically 97*946379e7Schristosallocated and must not be modified or freed. Otherwise 98*946379e7Schristos<i>msgid</i> or <i>msgid_plural</i> is returned, as 99*946379e7Schristosdescribed above.</td></table> 100*946379e7Schristos<a name="ERRORS"></a> 101*946379e7Schristos<h2>ERRORS</h2> 102*946379e7Schristos 103*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 104*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 105*946379e7Schristos<tr valign="top" align="left"> 106*946379e7Schristos<td width="10%"></td><td width="90%"> 107*946379e7Schristos<b>errno</b> is not modified.</td></table> 108*946379e7Schristos<a name="BUGS"></a> 109*946379e7Schristos<h2>BUGS</h2> 110*946379e7Schristos 111*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 112*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 113*946379e7Schristos<tr valign="top" align="left"> 114*946379e7Schristos<td width="10%"></td><td width="90%"> 115*946379e7SchristosThe return type ought to be <b>const char *</b>, but is 116*946379e7Schristos<b>char *</b> to avoid warnings in C code predating ANSI 117*946379e7SchristosC.</td></table> 118*946379e7Schristos<a name="SEE ALSO"></a> 119*946379e7Schristos<h2>SEE ALSO</h2> 120*946379e7Schristos 121*946379e7Schristos<table width="100%" border=0 rules="none" frame="void" 122*946379e7Schristos cols="2" cellspacing="0" cellpadding="0"> 123*946379e7Schristos<tr valign="top" align="left"> 124*946379e7Schristos<td width="10%"></td><td width="90%"> 125*946379e7Schristos<b>gettext</b>(3), <b>dgettext</b>(3), 126*946379e7Schristos<b>dcgettext</b>(3)</td></table> 127*946379e7Schristos<hr> 128*946379e7Schristos</body> 129*946379e7Schristos</html> 130