BINDTEXTDOMAIN(3) Library Functions Manual BINDTEXTDOMAIN(3) NNAAMMEE bindtextdomain - set directory containing message catalogs SSYYNNOOPPSSIISS ##iinncclluuddee <> cchhaarr ** bbiinnddtteexxttddoommaaiinn ((ccoonnsstt cchhaarr ** _d_o_m_a_i_n_n_a_m_e,, ccoonnsstt cchhaarr ** _d_i_r_n_a_m_e));; DDEESSCCRRIIPPTTIIOONN The bbiinnddtteexxttddoommaaiinn function sets the base directory of the hierarchy containing message catalogs for a given message domain. A message domain is a set of translatable _m_s_g_i_d messages. Usually, every software package has its own message domain. The need for calling bbiinnddtteexxttddoommaaiinn arises because packages are not always installed with the same prefix as the header and the libc/libintl libraries. Message catalogs will be expected at the pathnames _d_i_r_n_a_m_e/_l_o_c_a_l_e/_c_a_t_e_- _g_o_r_y/_d_o_m_a_i_n_n_a_m_e.mo, where _l_o_c_a_l_e is a locale name and _c_a_t_e_g_o_r_y is a locale facet such as LLCC__MMEESSSSAAGGEESS. _d_o_m_a_i_n_n_a_m_e must be a non-empty string. If _d_i_r_n_a_m_e is not NULL, the base directory for message catalogs belong- ing to domain _d_o_m_a_i_n_n_a_m_e is set to _d_i_r_n_a_m_e. The function makes copies of the argument strings as needed. If the program wishes to call the cchhddiirr function, it is important that _d_i_r_n_a_m_e be an absolute pathname; otherwise it cannot be guaranteed that the message catalogs will be found. If _d_i_r_n_a_m_e is NULL, the function returns the previously set base direc- tory for domain _d_o_m_a_i_n_n_a_m_e. RREETTUURRNN VVAALLUUEE If successful, the bbiinnddtteexxttddoommaaiinn function returns the current base directory for domain _d_o_m_a_i_n_n_a_m_e, after possibly changing it. The resulting string is valid until the next bbiinnddtteexxttddoommaaiinn call for the same _d_o_m_a_i_n_n_a_m_e and must not be modified or freed. If a memory alloca- tion failure occurs, it sets eerrrrnnoo to EENNOOMMEEMM and returns NULL. EERRRROORRSS The following error can occur, among others: EENNOOMMEEMM Not enough memory available. BBUUGGSS The return type ought to be ccoonnsstt cchhaarr **, but is cchhaarr ** to avoid warn- ings in C code predating ANSI C. SSEEEE AALLSSOO ggeetttteexxtt(3), ddggeetttteexxtt(3), ddccggeetttteexxtt(3), nnggeetttteexxtt(3), ddnnggeetttteexxtt(3), ddccnnggeetttteexxtt(3), tteexxttddoommaaiinn(3), rreeaallppaatthh(3) GNU gettext 0.19.8.1 May 2001 BINDTEXTDOMAIN(3)