NGETTEXT(3) Library Functions Manual NGETTEXT(3) NNAAMMEE ngettext, dngettext, dcngettext - translate message and choose plural form SSYYNNOOPPSSIISS ##iinncclluuddee <> cchhaarr ** nnggeetttteexxtt ((ccoonnsstt cchhaarr ** _m_s_g_i_d,, ccoonnsstt cchhaarr ** _m_s_g_i_d___p_l_u_r_a_l,, uunnssiiggnneedd lloonngg iinntt _n));; cchhaarr ** ddnnggeetttteexxtt ((ccoonnsstt cchhaarr ** _d_o_m_a_i_n_n_a_m_e,, ccoonnsstt cchhaarr ** _m_s_g_i_d,, ccoonnsstt cchhaarr ** _m_s_g_i_d___p_l_u_r_a_l,, uunnssiiggnneedd lloonngg iinntt _n));; cchhaarr ** ddccnnggeetttteexxtt ((ccoonnsstt cchhaarr ** _d_o_m_a_i_n_n_a_m_e,, ccoonnsstt cchhaarr ** _m_s_g_i_d,, ccoonnsstt cchhaarr ** _m_s_g_i_d___p_l_u_r_a_l,, uunnssiiggnneedd lloonngg iinntt _n,, iinntt _c_a_t_e_g_o_r_y));; DDEESSCCRRIIPPTTIIOONN The nnggeetttteexxtt, ddnnggeetttteexxtt and ddccnnggeetttteexxtt functions attempt to translate a text string into the user's native language, by looking up the appro- priate plural form of the translation in a message catalog. Plural forms are grammatical variants depending on the a number. Some languages have two forms, called singular and plural. Other languages have three forms, called singular, dual and plural. There are also lan- guages with four forms. The nnggeetttteexxtt, ddnnggeetttteexxtt and ddccnnggeetttteexxtt functions work like the ggeetttteexxtt, ddggeetttteexxtt and ddccggeetttteexxtt functions, respectively. Additionally, they choose the appropriate plural form, which depends on the number _n and the language of the message catalog where the translation was found. In the "C" locale, or if none of the used catalogs contain a transla- tion for _m_s_g_i_d, the nnggeetttteexxtt, ddnnggeetttteexxtt and ddccnnggeetttteexxtt functions return _m_s_g_i_d if _n == 1, or _m_s_g_i_d___p_l_u_r_a_l if _n != 1. RREETTUURRNN VVAALLUUEE If a translation was found in one of the specified catalogs, the appro- priate plural form is converted to the locale's codeset and returned. The resulting string is statically allocated and must not be modified or freed. Otherwise _m_s_g_i_d or _m_s_g_i_d___p_l_u_r_a_l is returned, as described above. EERRRROORRSS eerrrrnnoo is not modified. 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) GNU gettext 0.19.8.1 May 2001 NGETTEXT(3)