1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
8 <sect1 id="ch-system-gettext" role="wrap">
9 <?dbhtml filename="gettext.html"?>
11 <sect1info condition="script">
12 <productname>gettext</productname>
13 <productnumber>&gettext-version;</productnumber>
14 <address>&gettext-url;</address>
17 <title>Gettext-&gettext-version;</title>
19 <indexterm zone="ch-system-gettext">
20 <primary sortas="a-Gettext">Gettext</primary>
23 <sect2 role="package">
26 <para>The Gettext package contains utilities for internationalization and
27 localization. These allow programs to be compiled with NLS (Native Language
28 Support), enabling them to output messages in the user's native
32 <segtitle>&buildtime;</segtitle>
33 <segtitle>&diskspace;</segtitle>
36 <seg>&gettext-ch6-sbu;</seg>
37 <seg>&gettext-ch6-du;</seg>
43 <sect2 role="installation">
44 <title>Installation of Gettext</title>
46 <para>Prepare Gettext for compilation:</para>
48 <screen><userinput remap="configure">./configure --prefix=/usr \
50 --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
52 <para>Compile the package:</para>
54 <screen><userinput remap="make">make</userinput></screen>
56 <para>To test the results (this takes a long time, around 3 SBUs),
59 <screen><userinput remap="test">make check</userinput></screen>
61 <para>Nine tests fail due to missing dependencies.</para>
63 <para>Install the package:</para>
65 <screen><userinput remap="install">make install
66 chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
70 <sect2 id="contents-gettext" role="content">
71 <title>Contents of Gettext</title>
74 <segtitle>Installed programs</segtitle>
75 <segtitle>Installed libraries</segtitle>
76 <segtitle>Installed directories</segtitle>
79 <seg>autopoint, envsubst, gettext, gettext.sh,
80 gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
81 msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
82 ngettext, recode-sr-latin, and xgettext</seg>
83 <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
84 libgettextsrc.so, and preloadable_libintl.so</seg>
85 <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;, and
86 /usr/share/gettext</seg>
91 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
92 <?dbfo list-presentation="list"?>
93 <?dbhtml list-presentation="table"?>
95 <varlistentry id="autopoint">
96 <term><command>autopoint</command></term>
98 <para>Copies standard Gettext infrastructure files into a source
100 <indexterm zone="ch-system-gettext autopoint">
101 <primary sortas="b-autopoint">autopoint</primary>
106 <varlistentry id="envsubst">
107 <term><command>envsubst</command></term>
109 <para>Substitutes environment variables in shell format strings</para>
110 <indexterm zone="ch-system-gettext envsubst">
111 <primary sortas="b-envsubst">envsubst</primary>
116 <varlistentry id="gettext">
117 <term><command>gettext</command></term>
119 <para>Translates a natural language message into the user's language
120 by looking up the translation in a message catalog</para>
121 <indexterm zone="ch-system-gettext gettext">
122 <primary sortas="b-gettext">gettext</primary>
127 <varlistentry id="gettext.sh">
128 <term><command>gettext.sh</command></term>
130 <para>Primarily serves as a shell function library for gettext</para>
131 <indexterm zone="ch-system-gettext gettext.sh">
132 <primary sortas="b-gettext.sh">gettext.sh</primary>
137 <varlistentry id="gettextize">
138 <term><command>gettextize</command></term>
140 <para>Copies all standard Gettext files into the given top-level
141 directory of a package to begin internationalizing it</para>
142 <indexterm zone="ch-system-gettext gettextize">
143 <primary sortas="b-gettextize">gettextize</primary>
148 <varlistentry id="hostname-gettext">
149 <term><command>hostname</command></term>
151 <para>Displays a network hostname in various forms</para>
152 <indexterm zone="ch-system-gettext hostname-gettext">
153 <primary sortas="b-hostname-gettext">hostname</primary>
158 <varlistentry id="msgattrib">
159 <term><command>msgattrib</command></term>
161 <para>Filters the messages of a translation catalog according to their
162 attributes and manipulates the attributes</para>
163 <indexterm zone="ch-system-gettext msgattrib">
164 <primary sortas="b-msgattrib">msgattrib</primary>
169 <varlistentry id="msgcat">
170 <term><command>msgcat</command></term>
172 <para>Concatenates and merges the given
173 <filename class="extension">.po</filename> files</para>
174 <indexterm zone="ch-system-gettext msgcat">
175 <primary sortas="b-msgcat">msgcat</primary>
180 <varlistentry id="msgcmp">
181 <term><command>msgcmp</command></term>
183 <para>Compares two <filename class="extension">.po</filename>
184 files to check that both contain the same set of msgid strings</para>
185 <indexterm zone="ch-system-gettext msgcmp">
186 <primary sortas="b-msgcmp">msgcmp</primary>
191 <varlistentry id="msgcomm">
192 <term><command>msgcomm</command></term>
194 <para>Finds the messages that are common to to the given
195 <filename class="extension">.po</filename> files</para>
196 <indexterm zone="ch-system-gettext msgcomm">
197 <primary sortas="b-msgcomm">msgcomm</primary>
202 <varlistentry id="msgconv">
203 <term><command>msgconv</command></term>
205 <para>Converts a translation catalog to a different character
207 <indexterm zone="ch-system-gettext msgconv">
208 <primary sortas="b-msgconv">msgconv</primary>
213 <varlistentry id="msgen">
214 <term><command>msgen</command></term>
216 <para>Creates an English translation catalog</para>
217 <indexterm zone="ch-system-gettext msgen">
218 <primary sortas="b-msgen">msgen</primary>
223 <varlistentry id="msgexec">
224 <term><command>msgexec</command></term>
226 <para>Applies a command to all translations of a translation
228 <indexterm zone="ch-system-gettext msgexec">
229 <primary sortas="b-msgexec">msgexec</primary>
234 <varlistentry id="msgfilter">
235 <term><command>msgfilter</command></term>
237 <para>Applies a filter to all translations of a translation
239 <indexterm zone="ch-system-gettext msgfilter">
240 <primary sortas="b-msgfilter">msgfilter</primary>
245 <varlistentry id="msgfmt">
246 <term><command>msgfmt</command></term>
248 <para>Generates a binary message catalog from a translation
250 <indexterm zone="ch-system-gettext msgfmt">
251 <primary sortas="b-msgfmt">msgfmt</primary>
256 <varlistentry id="msggrep">
257 <term><command>msggrep</command></term>
259 <para>Extracts all messages of a translation catalog that match a
260 given pattern or belong to some given source files</para>
261 <indexterm zone="ch-system-gettext msggrep">
262 <primary sortas="b-msggrep">msggrep</primary>
267 <varlistentry id="msginit">
268 <term><command>msginit</command></term>
270 <para>Creates a new <filename class="extension">.po</filename> file,
271 initializing the meta information with values from the user's
273 <indexterm zone="ch-system-gettext msginit">
274 <primary sortas="b-msginit">msginit</primary>
279 <varlistentry id="msgmerge">
280 <term><command>msgmerge</command></term>
282 <para>Combines two raw translations into a single file</para>
283 <indexterm zone="ch-system-gettext msgmerge">
284 <primary sortas="b-msgmerge">msgmerge</primary>
289 <varlistentry id="msgunfmt">
290 <term><command>msgunfmt</command></term>
292 <para>Decompiles a binary message catalog into raw translation
294 <indexterm zone="ch-system-gettext msgunfmt">
295 <primary sortas="b-msgunfmt">msgunfmt</primary>
300 <varlistentry id="msguniq">
301 <term><command>msguniq</command></term>
303 <para>Unifies duplicate translations in a translation catalog</para>
304 <indexterm zone="ch-system-gettext msguniq">
305 <primary sortas="b-msguniq">msguniq</primary>
310 <varlistentry id="ngettext">
311 <term><command>ngettext</command></term>
313 <para>Displays native language translations of a textual message whose
314 grammatical form depends on a number</para>
315 <indexterm zone="ch-system-gettext ngettext">
316 <primary sortas="b-ngettext">ngettext</primary>
321 <varlistentry id="recode-sr-latin">
322 <term><command>recode-sr-latin</command></term>
324 <para>Recodes Serbian text from Cyrillic to Latin script</para>
325 <indexterm zone="ch-system-gettext recode-sr-latin">
326 <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
331 <varlistentry id="xgettext">
332 <term><command>xgettext</command></term>
334 <para>Extracts the translatable message lines from the given source
335 files to make the first translation template</para>
336 <indexterm zone="ch-system-gettext xgettext">
337 <primary sortas="b-xgettext">xgettext</primary>
342 <varlistentry id="libasprintf">
343 <term><filename class="libraryfile">libasprintf</filename></term>
345 <para>defines the <emphasis>autosprintf</emphasis> class, which makes
346 C formatted output routines usable in C++ programs, for use with the
347 <emphasis><string></emphasis> strings and the
348 <emphasis><iostream></emphasis> streams</para>
349 <indexterm zone="ch-system-gettext libasprintf">
350 <primary sortas="c-libasprintf">libasprintf</primary>
355 <varlistentry id="libgettextlib">
356 <term><filename class="libraryfile">libgettextlib</filename></term>
358 <para>a private library containing common routines used by the
359 various Gettext programs; these are not intended for general use</para>
360 <indexterm zone="ch-system-gettext libgettextlib">
361 <primary sortas="c-libgettextlib">libgettextlib</primary>
366 <varlistentry id="libgettextpo">
367 <term><filename class="libraryfile">libgettextpo</filename></term>
369 <para>Used to write specialized programs that process
370 <filename class="extension">.po</filename> files; this library is
371 used when the standard applications shipped with Gettext (such as
372 <command>msgcomm</command>, <command>msgcmp</command>,
373 <command>msgattrib</command>, and <command>msgen</command>) will
375 <indexterm zone="ch-system-gettext libgettextpo">
376 <primary sortas="c-libgettextpo">libgettextpo</primary>
381 <varlistentry id="libgettextsrc">
382 <term><filename class="libraryfile">libgettextsrc</filename></term>
384 <para>A private library containing common routines used by the
385 various Gettext programs; these are not intended for general use</para>
386 <indexterm zone="ch-system-gettext libgettextsrc">
387 <primary sortas="c-libgettextsrc">libgettextsrc</primary>
392 <varlistentry id="preloadable_libintl">
393 <term><filename class="libraryfile">preloadable_libintl</filename></term>
395 <para>A library, intended to be used by LD_PRELOAD that assists
396 <filename class="libraryfile">libintl</filename> in logging
397 untranslated messages</para>
398 <indexterm zone="ch-system-gettext preloadable_libintl">
399 <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>