Home | History | Annotate | Line # | Download | only in man
      1 <html>
      2 <head>
      3 <meta name="generator" content="groff -Thtml, see www.gnu.org">
      4 <meta name="Content-Style" content="text/css">
      5 <title>TEXTDOMAIN</title>
      6 </head>
      7 <body>
      8 
      9 <h1 align=center>TEXTDOMAIN</h1>
     10 <a href="#NAME">NAME</a><br>
     11 <a href="#SYNOPSIS">SYNOPSIS</a><br>
     12 <a href="#DESCRIPTION">DESCRIPTION</a><br>
     13 <a href="#RETURN VALUE">RETURN VALUE</a><br>
     14 <a href="#ERRORS">ERRORS</a><br>
     15 <a href="#BUGS">BUGS</a><br>
     16 <a href="#SEE ALSO">SEE ALSO</a><br>
     17 
     18 <hr>
     19 <!-- Creator     : groff version 1.17 -->
     20 <a name="NAME"></a>
     21 <h2>NAME</h2>
     22 <table width="100%" border=0 rules="none" frame="void"
     23        cols="2" cellspacing="0" cellpadding="0">
     24 <tr valign="top" align="left">
     25 <td width="10%"></td><td width="90%">
     26 textdomain - set domain for future gettext() calls</td></table>
     27 <a name="SYNOPSIS"></a>
     28 <h2>SYNOPSIS</h2>
     29 
     30 <table width="100%" border=0 rules="none" frame="void"
     31        cols="2" cellspacing="0" cellpadding="0">
     32 <tr valign="top" align="left">
     33 <td width="10%"></td><td width="90%">
     34 <pre><b>#include &lt;libintl.h&gt;
     35 
     36 char * textdomain (const char *</b> <i>domainname</i><b>);
     37 </b></pre></td></table>
     38 <a name="DESCRIPTION"></a>
     39 <h2>DESCRIPTION</h2>
     40 
     41 <table width="100%" border=0 rules="none" frame="void"
     42        cols="2" cellspacing="0" cellpadding="0">
     43 <tr valign="top" align="left">
     44 <td width="10%"></td><td width="90%">
     45 The <b>textdomain</b> function sets or retrieves the current
     46 message domain.</td></table>
     47 
     48 <table width="100%" border=0 rules="none" frame="void"
     49        cols="2" cellspacing="0" cellpadding="0">
     50 <tr valign="top" align="left">
     51 <td width="10%"></td><td width="90%">
     52 A message domain is a set of translatable <i>msgid</i>
     53 messages. Usually, every software package has its own
     54 message domain. The domain name is used to determine the
     55 message catalog where a translation is looked up; it must be
     56 a non-empty string.</td></table>
     57 
     58 <table width="100%" border=0 rules="none" frame="void"
     59        cols="2" cellspacing="0" cellpadding="0">
     60 <tr valign="top" align="left">
     61 <td width="10%"></td><td width="90%">
     62 The current message domain is used by the <b>gettext</b>,
     63 <b>ngettext</b> functions, and by the <b>dgettext</b>,
     64 <b>dcgettext</b>, <b>dngettext</b> and <b>dcngettext</b>
     65 functions when called with a NULL domainname
     66 argument.</td></table>
     67 
     68 <table width="100%" border=0 rules="none" frame="void"
     69        cols="2" cellspacing="0" cellpadding="0">
     70 <tr valign="top" align="left">
     71 <td width="10%"></td><td width="90%">
     72 If <i>domainname</i> is not NULL, the current message domain
     73 is set to <i>domainname</i>. The string the function stores
     74 internally is a copy of the <i>domainname</i>
     75 argument.</td></table>
     76 
     77 <table width="100%" border=0 rules="none" frame="void"
     78        cols="2" cellspacing="0" cellpadding="0">
     79 <tr valign="top" align="left">
     80 <td width="10%"></td><td width="90%">
     81 If <i>domainname</i> is NULL, the function returns the
     82 current message domain.</td></table>
     83 <a name="RETURN VALUE"></a>
     84 <h2>RETURN VALUE</h2>
     85 
     86 <table width="100%" border=0 rules="none" frame="void"
     87        cols="2" cellspacing="0" cellpadding="0">
     88 <tr valign="top" align="left">
     89 <td width="10%"></td><td width="90%">
     90 If successful, the <b>textdomain</b> function returns the
     91 current message domain, after possibly changing it. The
     92 resulting string is valid until the next <b>textdomain</b>
     93 call and must not be modified or freed. If a memory
     94 allocation failure occurs, it sets <b>errno</b> to
     95 <b>ENOMEM</b> and returns NULL.</td></table>
     96 <a name="ERRORS"></a>
     97 <h2>ERRORS</h2>
     98 
     99 <table width="100%" border=0 rules="none" frame="void"
    100        cols="2" cellspacing="0" cellpadding="0">
    101 <tr valign="top" align="left">
    102 <td width="10%"></td><td width="90%">
    103 The following error can occur, among others:</td></table>
    104 
    105 <table width="100%" border=0 rules="none" frame="void"
    106        cols="2" cellspacing="0" cellpadding="0">
    107 <tr valign="top" align="left">
    108 <td width="10%"></td><td width="90%">
    109 <b>ENOMEM</b></td></table>
    110 
    111 <table width="100%" border=0 rules="none" frame="void"
    112        cols="2" cellspacing="0" cellpadding="0">
    113 <tr valign="top" align="left">
    114 <td width="21%"></td><td width="79%">
    115 Not enough memory available.</td></table>
    116 <a name="BUGS"></a>
    117 <h2>BUGS</h2>
    118 
    119 <table width="100%" border=0 rules="none" frame="void"
    120        cols="2" cellspacing="0" cellpadding="0">
    121 <tr valign="top" align="left">
    122 <td width="10%"></td><td width="90%">
    123 The return type ought to be <b>const char *</b>, but is
    124 <b>char *</b> to avoid warnings in C code predating ANSI
    125 C.</td></table>
    126 <a name="SEE ALSO"></a>
    127 <h2>SEE ALSO</h2>
    128 
    129 <table width="100%" border=0 rules="none" frame="void"
    130        cols="2" cellspacing="0" cellpadding="0">
    131 <tr valign="top" align="left">
    132 <td width="10%"></td><td width="90%">
    133 <b>gettext</b>(3), <b>ngettext</b>(3),
    134 <b>bindtextdomain</b>(3),
    135 <b>bind_textdomain_codeset</b>(3)</td></table>
    136 <hr>
    137 </body>
    138 </html>
    139