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 <!-- this has been fixed in upstream gnulib, when a new version of
47 gettext is released, please check #4055 to see if the change has been
48 picked up in this package -->
49 <para>First, suppress two invocations of test-lock which on some machines
50 can loop forever:</para>
52 <screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in &&
53 sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>
55 <para>Prepare Gettext for compilation:</para>
57 <screen><userinput remap="configure">./configure --prefix=/usr \
59 --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
61 <para>Compile the package:</para>
63 <screen><userinput remap="make">make</userinput></screen>
65 <para>To test the results (this takes a long time, around 3 SBUs),
68 <screen><userinput remap="test">make check</userinput></screen>
70 <para>Install the package:</para>
72 <screen><userinput remap="install">make install
73 chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
77 <sect2 id="contents-gettext" role="content">
78 <title>Contents of Gettext</title>
81 <segtitle>Installed programs</segtitle>
82 <segtitle>Installed libraries</segtitle>
83 <segtitle>Installed directories</segtitle>
86 <seg>autopoint, envsubst, gettext, gettext.sh,
87 gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
88 msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
89 ngettext, recode-sr-latin, and xgettext</seg>
90 <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
91 libgettextsrc.so, and preloadable_libintl.so</seg>
92 <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;, and
93 /usr/share/gettext</seg>
98 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
99 <?dbfo list-presentation="list"?>
100 <?dbhtml list-presentation="table"?>
102 <varlistentry id="autopoint">
103 <term><command>autopoint</command></term>
105 <para>Copies standard Gettext infrastructure files into a source
107 <indexterm zone="ch-system-gettext autopoint">
108 <primary sortas="b-autopoint">autopoint</primary>
113 <varlistentry id="envsubst">
114 <term><command>envsubst</command></term>
116 <para>Substitutes environment variables in shell format strings</para>
117 <indexterm zone="ch-system-gettext envsubst">
118 <primary sortas="b-envsubst">envsubst</primary>
123 <varlistentry id="gettext">
124 <term><command>gettext</command></term>
126 <para>Translates a natural language message into the user's language
127 by looking up the translation in a message catalog</para>
128 <indexterm zone="ch-system-gettext gettext">
129 <primary sortas="b-gettext">gettext</primary>
134 <varlistentry id="gettext.sh">
135 <term><command>gettext.sh</command></term>
137 <para>Primarily serves as a shell function library for gettext</para>
138 <indexterm zone="ch-system-gettext gettext.sh">
139 <primary sortas="b-gettext.sh">gettext.sh</primary>
144 <varlistentry id="gettextize">
145 <term><command>gettextize</command></term>
147 <para>Copies all standard Gettext files into the given top-level
148 directory of a package to begin internationalizing it</para>
149 <indexterm zone="ch-system-gettext gettextize">
150 <primary sortas="b-gettextize">gettextize</primary>
155 <varlistentry id="msgattrib">
156 <term><command>msgattrib</command></term>
158 <para>Filters the messages of a translation catalog according to their
159 attributes and manipulates the attributes</para>
160 <indexterm zone="ch-system-gettext msgattrib">
161 <primary sortas="b-msgattrib">msgattrib</primary>
166 <varlistentry id="msgcat">
167 <term><command>msgcat</command></term>
169 <para>Concatenates and merges the given
170 <filename class="extension">.po</filename> files</para>
171 <indexterm zone="ch-system-gettext msgcat">
172 <primary sortas="b-msgcat">msgcat</primary>
177 <varlistentry id="msgcmp">
178 <term><command>msgcmp</command></term>
180 <para>Compares two <filename class="extension">.po</filename>
181 files to check that both contain the same set of msgid strings</para>
182 <indexterm zone="ch-system-gettext msgcmp">
183 <primary sortas="b-msgcmp">msgcmp</primary>
188 <varlistentry id="msgcomm">
189 <term><command>msgcomm</command></term>
191 <para>Finds the messages that are common to the given
192 <filename class="extension">.po</filename> files</para>
193 <indexterm zone="ch-system-gettext msgcomm">
194 <primary sortas="b-msgcomm">msgcomm</primary>
199 <varlistentry id="msgconv">
200 <term><command>msgconv</command></term>
202 <para>Converts a translation catalog to a different character
204 <indexterm zone="ch-system-gettext msgconv">
205 <primary sortas="b-msgconv">msgconv</primary>
210 <varlistentry id="msgen">
211 <term><command>msgen</command></term>
213 <para>Creates an English translation catalog</para>
214 <indexterm zone="ch-system-gettext msgen">
215 <primary sortas="b-msgen">msgen</primary>
220 <varlistentry id="msgexec">
221 <term><command>msgexec</command></term>
223 <para>Applies a command to all translations of a translation
225 <indexterm zone="ch-system-gettext msgexec">
226 <primary sortas="b-msgexec">msgexec</primary>
231 <varlistentry id="msgfilter">
232 <term><command>msgfilter</command></term>
234 <para>Applies a filter to all translations of a translation
236 <indexterm zone="ch-system-gettext msgfilter">
237 <primary sortas="b-msgfilter">msgfilter</primary>
242 <varlistentry id="msgfmt">
243 <term><command>msgfmt</command></term>
245 <para>Generates a binary message catalog from a translation
247 <indexterm zone="ch-system-gettext msgfmt">
248 <primary sortas="b-msgfmt">msgfmt</primary>
253 <varlistentry id="msggrep">
254 <term><command>msggrep</command></term>
256 <para>Extracts all messages of a translation catalog that match a
257 given pattern or belong to some given source files</para>
258 <indexterm zone="ch-system-gettext msggrep">
259 <primary sortas="b-msggrep">msggrep</primary>
264 <varlistentry id="msginit">
265 <term><command>msginit</command></term>
267 <para>Creates a new <filename class="extension">.po</filename> file,
268 initializing the meta information with values from the user's
270 <indexterm zone="ch-system-gettext msginit">
271 <primary sortas="b-msginit">msginit</primary>
276 <varlistentry id="msgmerge">
277 <term><command>msgmerge</command></term>
279 <para>Combines two raw translations into a single file</para>
280 <indexterm zone="ch-system-gettext msgmerge">
281 <primary sortas="b-msgmerge">msgmerge</primary>
286 <varlistentry id="msgunfmt">
287 <term><command>msgunfmt</command></term>
289 <para>Decompiles a binary message catalog into raw translation
291 <indexterm zone="ch-system-gettext msgunfmt">
292 <primary sortas="b-msgunfmt">msgunfmt</primary>
297 <varlistentry id="msguniq">
298 <term><command>msguniq</command></term>
300 <para>Unifies duplicate translations in a translation catalog</para>
301 <indexterm zone="ch-system-gettext msguniq">
302 <primary sortas="b-msguniq">msguniq</primary>
307 <varlistentry id="ngettext">
308 <term><command>ngettext</command></term>
310 <para>Displays native language translations of a textual message whose
311 grammatical form depends on a number</para>
312 <indexterm zone="ch-system-gettext ngettext">
313 <primary sortas="b-ngettext">ngettext</primary>
318 <varlistentry id="recode-sr-latin">
319 <term><command>recode-sr-latin</command></term>
321 <para>Recodes Serbian text from Cyrillic to Latin script</para>
322 <indexterm zone="ch-system-gettext recode-sr-latin">
323 <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
328 <varlistentry id="xgettext">
329 <term><command>xgettext</command></term>
331 <para>Extracts the translatable message lines from the given source
332 files to make the first translation template</para>
333 <indexterm zone="ch-system-gettext xgettext">
334 <primary sortas="b-xgettext">xgettext</primary>
339 <varlistentry id="libasprintf">
340 <term><filename class="libraryfile">libasprintf</filename></term>
342 <para>defines the <emphasis>autosprintf</emphasis> class, which makes
343 C formatted output routines usable in C++ programs, for use with the
344 <emphasis><string></emphasis> strings and the
345 <emphasis><iostream></emphasis> streams</para>
346 <indexterm zone="ch-system-gettext libasprintf">
347 <primary sortas="c-libasprintf">libasprintf</primary>
352 <varlistentry id="libgettextlib">
353 <term><filename class="libraryfile">libgettextlib</filename></term>
355 <para>a private library containing common routines used by the
356 various Gettext programs; these are not intended for general use</para>
357 <indexterm zone="ch-system-gettext libgettextlib">
358 <primary sortas="c-libgettextlib">libgettextlib</primary>
363 <varlistentry id="libgettextpo">
364 <term><filename class="libraryfile">libgettextpo</filename></term>
366 <para>Used to write specialized programs that process
367 <filename class="extension">.po</filename> files; this library is
368 used when the standard applications shipped with Gettext (such as
369 <command>msgcomm</command>, <command>msgcmp</command>,
370 <command>msgattrib</command>, and <command>msgen</command>) will
372 <indexterm zone="ch-system-gettext libgettextpo">
373 <primary sortas="c-libgettextpo">libgettextpo</primary>
378 <varlistentry id="libgettextsrc">
379 <term><filename class="libraryfile">libgettextsrc</filename></term>
381 <para>A private library containing common routines used by the
382 various Gettext programs; these are not intended for general use</para>
383 <indexterm zone="ch-system-gettext libgettextsrc">
384 <primary sortas="c-libgettextsrc">libgettextsrc</primary>
389 <varlistentry id="preloadable_libintl">
390 <term><filename class="libraryfile">preloadable_libintl</filename></term>
392 <para>A library, intended to be used by LD_PRELOAD that assists
393 <filename class="libraryfile">libintl</filename> in logging
394 untranslated messages</para>
395 <indexterm zone="ch-system-gettext preloadable_libintl">
396 <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>