annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/man/man3/textdomain.3 @ 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 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
jpayne@68 2 .\"
jpayne@68 3 .\" This is free documentation; you can redistribute it and/or
jpayne@68 4 .\" modify it under the terms of the GNU General Public License as
jpayne@68 5 .\" published by the Free Software Foundation; either version 2 of
jpayne@68 6 .\" the License, or (at your option) any later version.
jpayne@68 7 .\"
jpayne@68 8 .\" References consulted:
jpayne@68 9 .\" GNU glibc-2 source code and manual
jpayne@68 10 .\" GNU gettext source code and manual
jpayne@68 11 .\" LI18NUX 2000 Globalization Specification
jpayne@68 12 .\"
jpayne@68 13 .TH TEXTDOMAIN 3 "May 2001" "GNU gettext 0.22.5"
jpayne@68 14 .SH NAME
jpayne@68 15 textdomain \- set domain for future gettext() calls
jpayne@68 16 .SH SYNOPSIS
jpayne@68 17 .nf
jpayne@68 18 .B #include <libintl.h>
jpayne@68 19 .sp
jpayne@68 20 .BI "char * textdomain (const char * " domainname );
jpayne@68 21 .fi
jpayne@68 22 .SH DESCRIPTION
jpayne@68 23 The \fBtextdomain\fP function sets or retrieves the current message domain.
jpayne@68 24 .PP
jpayne@68 25 A message domain is a set of translatable \fImsgid\fP messages. Usually,
jpayne@68 26 every software package has its own message domain. The domain name is used
jpayne@68 27 to determine the message catalog where a translation is looked up; it must
jpayne@68 28 be a non-empty string.
jpayne@68 29 .PP
jpayne@68 30 The current message domain is used by the \fBgettext\fP, \fBngettext\fP
jpayne@68 31 functions, and by the \fBdgettext\fP, \fBdcgettext\fP, \fBdngettext\fP and
jpayne@68 32 \fBdcngettext\fP functions when called with a NULL domainname argument.
jpayne@68 33 .PP
jpayne@68 34 If \fIdomainname\fP is not NULL, the current message domain is set to
jpayne@68 35 \fIdomainname\fP. The string the function stores internally is a copy of the
jpayne@68 36 \fIdomainname\fP argument.
jpayne@68 37 .PP
jpayne@68 38 If \fIdomainname\fP is NULL, the function returns the current message domain.
jpayne@68 39 .SH "RETURN VALUE"
jpayne@68 40 If successful, the \fBtextdomain\fP function returns the current message
jpayne@68 41 domain, after possibly changing it. The resulting string is valid until the
jpayne@68 42 next \fBtextdomain\fP call and must not be modified or freed. If a memory
jpayne@68 43 allocation failure occurs, it sets \fBerrno\fP to \fBENOMEM\fP and returns
jpayne@68 44 NULL.
jpayne@68 45 .SH ERRORS
jpayne@68 46 The following error can occur, among others:
jpayne@68 47 .TP
jpayne@68 48 .B ENOMEM
jpayne@68 49 Not enough memory available.
jpayne@68 50 .SH BUGS
jpayne@68 51 The return type ought to be \fBconst char *\fP, but is \fBchar *\fP to avoid
jpayne@68 52 warnings in C code predating ANSI C.
jpayne@68 53 .SH "SEE ALSO"
jpayne@68 54 .BR gettext (3),
jpayne@68 55 .BR ngettext (3),
jpayne@68 56 .BR bindtextdomain (3),
jpayne@68 57 .BR bind_textdomain_codeset (3)