annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/doc/gettext/bindtextdomain.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>BINDTEXTDOMAIN</title>
jpayne@68 16
jpayne@68 17 </head>
jpayne@68 18 <body>
jpayne@68 19
jpayne@68 20 <h1 align="center">BINDTEXTDOMAIN</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">bindtextdomain
jpayne@68 39 - set directory containing message catalogs</p>
jpayne@68 40
jpayne@68 41 <h2>SYNOPSIS
jpayne@68 42 <a name="SYNOPSIS"></a>
jpayne@68 43 </h2>
jpayne@68 44
jpayne@68 45
jpayne@68 46 <p style="margin-left:11%; margin-top: 1em"><b>#include
jpayne@68 47 &lt;libintl.h&gt;</b></p>
jpayne@68 48
jpayne@68 49 <p style="margin-left:11%; margin-top: 1em"><b>char *
jpayne@68 50 bindtextdomain (const char *</b> <i>domainname</i><b>, const
jpayne@68 51 char *</b> <i>dirname</i><b>);</b></p>
jpayne@68 52
jpayne@68 53 <h2>DESCRIPTION
jpayne@68 54 <a name="DESCRIPTION"></a>
jpayne@68 55 </h2>
jpayne@68 56
jpayne@68 57
jpayne@68 58 <p style="margin-left:11%; margin-top: 1em">The
jpayne@68 59 <b>bindtextdomain</b> function sets the base directory of
jpayne@68 60 the hierarchy containing message catalogs for a given
jpayne@68 61 message domain.</p>
jpayne@68 62
jpayne@68 63 <p style="margin-left:11%; margin-top: 1em">A message
jpayne@68 64 domain is a set of translatable <i>msgid</i> messages.
jpayne@68 65 Usually, every software package has its own message domain.
jpayne@68 66 The need for calling <b>bindtextdomain</b> arises because
jpayne@68 67 packages are not always installed with the same prefix as
jpayne@68 68 the &lt;libintl.h&gt; header and the libc/libintl
jpayne@68 69 libraries.</p>
jpayne@68 70
jpayne@68 71 <p style="margin-left:11%; margin-top: 1em">Message
jpayne@68 72 catalogs will be expected at the pathnames
jpayne@68 73 <i>dirname</i>/<i>locale</i>/<i>category</i>/<i>domainname</i>.mo,
jpayne@68 74 where <i>locale</i> is a locale name and <i>category</i> is
jpayne@68 75 a locale facet such as <b>LC_MESSAGES</b>.</p>
jpayne@68 76
jpayne@68 77
jpayne@68 78 <p style="margin-left:11%; margin-top: 1em"><i>domainname</i>
jpayne@68 79 must be a non-empty string.</p>
jpayne@68 80
jpayne@68 81 <p style="margin-left:11%; margin-top: 1em">If
jpayne@68 82 <i>dirname</i> is not NULL, the base directory for message
jpayne@68 83 catalogs belonging to domain <i>domainname</i> is set to
jpayne@68 84 <i>dirname</i>. The function makes copies of the argument
jpayne@68 85 strings as needed. If the program wishes to call the
jpayne@68 86 <b>chdir</b> function, it is important that <i>dirname</i>
jpayne@68 87 be an absolute pathname; otherwise it cannot be guaranteed
jpayne@68 88 that the message catalogs will be found.</p>
jpayne@68 89
jpayne@68 90 <p style="margin-left:11%; margin-top: 1em">If
jpayne@68 91 <i>dirname</i> is NULL, the function returns the previously
jpayne@68 92 set base directory for domain <i>domainname</i>.</p>
jpayne@68 93
jpayne@68 94 <h2>RETURN VALUE
jpayne@68 95 <a name="RETURN VALUE"></a>
jpayne@68 96 </h2>
jpayne@68 97
jpayne@68 98
jpayne@68 99 <p style="margin-left:11%; margin-top: 1em">If successful,
jpayne@68 100 the <b>bindtextdomain</b> function returns the current base
jpayne@68 101 directory for domain <i>domainname</i>, after possibly
jpayne@68 102 changing it. The resulting string is valid until the next
jpayne@68 103 <b>bindtextdomain</b> call for the same <i>domainname</i>
jpayne@68 104 and must not be modified or freed. If a memory allocation
jpayne@68 105 failure occurs, it sets <b>errno</b> to <b>ENOMEM</b> and
jpayne@68 106 returns NULL.</p>
jpayne@68 107
jpayne@68 108 <h2>ERRORS
jpayne@68 109 <a name="ERRORS"></a>
jpayne@68 110 </h2>
jpayne@68 111
jpayne@68 112
jpayne@68 113 <p style="margin-left:11%; margin-top: 1em">The following
jpayne@68 114 error can occur, among others:</p>
jpayne@68 115
jpayne@68 116 <table width="100%" border="0" rules="none" frame="void"
jpayne@68 117 cellspacing="0" cellpadding="0">
jpayne@68 118 <tr valign="top" align="left">
jpayne@68 119 <td width="11%"></td>
jpayne@68 120 <td width="9%">
jpayne@68 121
jpayne@68 122
jpayne@68 123 <p><b>ENOMEM</b></p></td>
jpayne@68 124 <td width="2%"></td>
jpayne@68 125 <td width="43%">
jpayne@68 126
jpayne@68 127
jpayne@68 128 <p>Not enough memory available.</p></td>
jpayne@68 129 <td width="35%">
jpayne@68 130 </td></tr>
jpayne@68 131 </table>
jpayne@68 132
jpayne@68 133 <h2>BUGS
jpayne@68 134 <a name="BUGS"></a>
jpayne@68 135 </h2>
jpayne@68 136
jpayne@68 137
jpayne@68 138 <p style="margin-left:11%; margin-top: 1em">The return type
jpayne@68 139 ought to be <b>const char *</b>, but is <b>char *</b> to
jpayne@68 140 avoid warnings in C code predating ANSI C.</p>
jpayne@68 141
jpayne@68 142 <h2>SEE ALSO
jpayne@68 143 <a name="SEE ALSO"></a>
jpayne@68 144 </h2>
jpayne@68 145
jpayne@68 146
jpayne@68 147
jpayne@68 148 <p style="margin-left:11%; margin-top: 1em"><b>gettext</b>(3),
jpayne@68 149 <b>dgettext</b>(3), <b>dcgettext</b>(3), <b>ngettext</b>(3),
jpayne@68 150 <b>dngettext</b>(3), <b>dcngettext</b>(3),
jpayne@68 151 <b>textdomain</b>(3), <b>realpath</b>(3)</p>
jpayne@68 152 <hr>
jpayne@68 153 </body>
jpayne@68 154 </html>