annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/gettext/ngettext.3.html @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 <!-- Creator : groff version 1.22.3 -->
jpayne@68 2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
jpayne@68 3 "http://www.w3.org/TR/html4/loose.dtd">
jpayne@68 4 <html>
jpayne@68 5 <head>
jpayne@68 6 <meta name="generator" content="groff -Thtml, see www.gnu.org">
jpayne@68 7 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
jpayne@68 8 <meta name="Content-Style" content="text/css">
jpayne@68 9 <style type="text/css">
jpayne@68 10 p { margin-top: 0; margin-bottom: 0; vertical-align: top }
jpayne@68 11 pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
jpayne@68 12 table { margin-top: 0; margin-bottom: 0; vertical-align: top }
jpayne@68 13 h1 { text-align: center }
jpayne@68 14 </style>
jpayne@68 15 <title>NGETTEXT</title>
jpayne@68 16
jpayne@68 17 </head>
jpayne@68 18 <body>
jpayne@68 19
jpayne@68 20 <h1 align="center">NGETTEXT</h1>
jpayne@68 21
jpayne@68 22 <a href="#NAME">NAME</a><br>
jpayne@68 23 <a href="#SYNOPSIS">SYNOPSIS</a><br>
jpayne@68 24 <a href="#DESCRIPTION">DESCRIPTION</a><br>
jpayne@68 25 <a href="#RETURN VALUE">RETURN VALUE</a><br>
jpayne@68 26 <a href="#ERRORS">ERRORS</a><br>
jpayne@68 27 <a href="#BUGS">BUGS</a><br>
jpayne@68 28 <a href="#SEE ALSO">SEE ALSO</a><br>
jpayne@68 29
jpayne@68 30 <hr>
jpayne@68 31
jpayne@68 32
jpayne@68 33 <h2>NAME
jpayne@68 34 <a name="NAME"></a>
jpayne@68 35 </h2>
jpayne@68 36
jpayne@68 37
jpayne@68 38 <p style="margin-left:11%; margin-top: 1em">ngettext,
jpayne@68 39 dngettext, dcngettext - translate message and choose
jpayne@68 40 plural form</p>
jpayne@68 41
jpayne@68 42 <h2>SYNOPSIS
jpayne@68 43 <a name="SYNOPSIS"></a>
jpayne@68 44 </h2>
jpayne@68 45
jpayne@68 46
jpayne@68 47 <p style="margin-left:11%; margin-top: 1em"><b>#include
jpayne@68 48 &lt;libintl.h&gt;</b></p>
jpayne@68 49
jpayne@68 50 <p style="margin-left:11%; margin-top: 1em"><b>char *
jpayne@68 51 ngettext (const char *</b> <i>msgid</i><b>, const char *</b>
jpayne@68 52 <i>msgid_plural</i><b>, <br>
jpayne@68 53 unsigned long int</b> <i>n</i><b>); <br>
jpayne@68 54 char * dngettext (const char *</b> <i>domainname</i><b>,
jpayne@68 55 <br>
jpayne@68 56 const char *</b> <i>msgid</i><b>, const char *</b>
jpayne@68 57 <i>msgid_plural</i><b>, <br>
jpayne@68 58 unsigned long int</b> <i>n</i><b>); <br>
jpayne@68 59 char * dcngettext (const char *</b> <i>domainname</i><b>,
jpayne@68 60 <br>
jpayne@68 61 const char *</b> <i>msgid</i><b>, const char *</b>
jpayne@68 62 <i>msgid_plural</i><b>, <br>
jpayne@68 63 unsigned long int</b> <i>n</i><b>, int</b>
jpayne@68 64 <i>category</i><b>);</b></p>
jpayne@68 65
jpayne@68 66 <h2>DESCRIPTION
jpayne@68 67 <a name="DESCRIPTION"></a>
jpayne@68 68 </h2>
jpayne@68 69
jpayne@68 70
jpayne@68 71 <p style="margin-left:11%; margin-top: 1em">The
jpayne@68 72 <b>ngettext</b>, <b>dngettext</b> and <b>dcngettext</b>
jpayne@68 73 functions attempt to translate a text string into the
jpayne@68 74 user&rsquo;s native language, by looking up the appropriate
jpayne@68 75 plural form of the translation in a message catalog.</p>
jpayne@68 76
jpayne@68 77 <p style="margin-left:11%; margin-top: 1em">Plural forms
jpayne@68 78 are grammatical variants depending on the a number. Some
jpayne@68 79 languages have two forms, called singular and plural. Other
jpayne@68 80 languages have three forms, called singular, dual and
jpayne@68 81 plural. There are also languages with four forms.</p>
jpayne@68 82
jpayne@68 83 <p style="margin-left:11%; margin-top: 1em">The
jpayne@68 84 <b>ngettext</b>, <b>dngettext</b> and <b>dcngettext</b>
jpayne@68 85 functions work like the <b>gettext</b>, <b>dgettext</b> and
jpayne@68 86 <b>dcgettext</b> functions, respectively. Additionally, they
jpayne@68 87 choose the appropriate plural form, which depends on the
jpayne@68 88 number <i>n</i> and the language of the message catalog
jpayne@68 89 where the translation was found.</p>
jpayne@68 90
jpayne@68 91 <p style="margin-left:11%; margin-top: 1em">In the
jpayne@68 92 &quot;C&quot; locale, or if none of the used catalogs
jpayne@68 93 contain a translation for <i>msgid</i>, the <b>ngettext</b>,
jpayne@68 94 <b>dngettext</b> and <b>dcngettext</b> functions return
jpayne@68 95 <i>msgid</i> if <i>n</i> == 1, or <i>msgid_plural</i> if
jpayne@68 96 <i>n</i> != 1.</p>
jpayne@68 97
jpayne@68 98 <h2>RETURN VALUE
jpayne@68 99 <a name="RETURN VALUE"></a>
jpayne@68 100 </h2>
jpayne@68 101
jpayne@68 102
jpayne@68 103 <p style="margin-left:11%; margin-top: 1em">If a
jpayne@68 104 translation was found in one of the specified catalogs, the
jpayne@68 105 appropriate plural form is converted to the locale&rsquo;s
jpayne@68 106 codeset and returned. The resulting string is statically
jpayne@68 107 allocated and must not be modified or freed. Otherwise
jpayne@68 108 <i>msgid</i> or <i>msgid_plural</i> is returned, as
jpayne@68 109 described above.</p>
jpayne@68 110
jpayne@68 111 <h2>ERRORS
jpayne@68 112 <a name="ERRORS"></a>
jpayne@68 113 </h2>
jpayne@68 114
jpayne@68 115
jpayne@68 116 <p style="margin-left:11%; margin-top: 1em"><b>errno</b> is
jpayne@68 117 not modified.</p>
jpayne@68 118
jpayne@68 119 <h2>BUGS
jpayne@68 120 <a name="BUGS"></a>
jpayne@68 121 </h2>
jpayne@68 122
jpayne@68 123
jpayne@68 124 <p style="margin-left:11%; margin-top: 1em">The return type
jpayne@68 125 ought to be <b>const char *</b>, but is <b>char *</b> to
jpayne@68 126 avoid warnings in C code predating ANSI C.</p>
jpayne@68 127
jpayne@68 128 <h2>SEE ALSO
jpayne@68 129 <a name="SEE ALSO"></a>
jpayne@68 130 </h2>
jpayne@68 131
jpayne@68 132
jpayne@68 133
jpayne@68 134 <p style="margin-left:11%; margin-top: 1em"><b>gettext</b>(3),
jpayne@68 135 <b>dgettext</b>(3), <b>dcgettext</b>(3)</p>
jpayne@68 136 <hr>
jpayne@68 137 </body>
jpayne@68 138 </html>