[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[6a82dd9] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-gettext" role="wrap">
|
---|
[6a82dd9] | 9 | <?dbhtml filename="gettext.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>gettext</productname>
|
---|
| 13 | <productnumber>&gettext-version;</productnumber>
|
---|
| 14 | <address>&gettext-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[6a82dd9] | 17 | <title>Gettext-&gettext-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-gettext">
|
---|
| 20 | <primary sortas="a-Gettext">Gettext</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[673b0d8] | 25 |
|
---|
[6a82dd9] | 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
|
---|
| 29 | language.</para>
|
---|
[6370fa6] | 30 |
|
---|
[6a82dd9] | 31 | <segmentedlist>
|
---|
| 32 | <segtitle>&buildtime;</segtitle>
|
---|
| 33 | <segtitle>&diskspace;</segtitle>
|
---|
[5888299] | 34 |
|
---|
[6a82dd9] | 35 | <seglistitem>
|
---|
[e4a5635] | 36 | <seg>&gettext-ch6-sbu;</seg>
|
---|
| 37 | <seg>&gettext-ch6-du;</seg>
|
---|
[6a82dd9] | 38 | </seglistitem>
|
---|
| 39 | </segmentedlist>
|
---|
[a001133] | 40 |
|
---|
[6a82dd9] | 41 | </sect2>
|
---|
| 42 |
|
---|
| 43 | <sect2 role="installation">
|
---|
| 44 | <title>Installation of Gettext</title>
|
---|
| 45 |
|
---|
| 46 | <para>Prepare Gettext for compilation:</para>
|
---|
[73aedd1d] | 47 |
|
---|
[73b2841] | 48 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
| 49 | --disable-static \
|
---|
| 50 | --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
|
---|
[73aedd1d] | 51 |
|
---|
[6a82dd9] | 52 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 53 |
|
---|
[0445a3d] | 54 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 55 |
|
---|
[ef31c67] | 56 | <para>To test the results (this takes a long time, around 3 SBUs),
|
---|
| 57 | issue:</para>
|
---|
[0445a3d] | 58 |
|
---|
| 59 | <screen><userinput remap="test">make check</userinput></screen>
|
---|
| 60 |
|
---|
[6bf9d727] | 61 | <para>Nine tests fail due to missing dependencies.</para>
|
---|
| 62 |
|
---|
[6a82dd9] | 63 | <para>Install the package:</para>
|
---|
[73aedd1d] | 64 |
|
---|
[040ecb6] | 65 | <screen><userinput remap="install">make install
|
---|
| 66 | chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
|
---|
[73aedd1d] | 67 |
|
---|
[6a82dd9] | 68 | </sect2>
|
---|
| 69 |
|
---|
| 70 | <sect2 id="contents-gettext" role="content">
|
---|
| 71 | <title>Contents of Gettext</title>
|
---|
| 72 |
|
---|
| 73 | <segmentedlist>
|
---|
| 74 | <segtitle>Installed programs</segtitle>
|
---|
| 75 | <segtitle>Installed libraries</segtitle>
|
---|
[fe05b08] | 76 | <segtitle>Installed directories</segtitle>
|
---|
[6a82dd9] | 77 |
|
---|
| 78 | <seglistitem>
|
---|
[040ecb6] | 79 | <seg>autopoint, envsubst, gettext, gettext.sh,
|
---|
[bd312dc] | 80 | gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
|
---|
[6a82dd9] | 81 | msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
|
---|
[2791a8e] | 82 | ngettext, recode-sr-latin, and xgettext</seg>
|
---|
[040ecb6] | 83 | <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
|
---|
[873f3aa] | 84 | libgettextsrc.so, and preloadable_libintl.so</seg>
|
---|
[7bb9fda] | 85 | <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;, and
|
---|
[fe05b08] | 86 | /usr/share/gettext</seg>
|
---|
[6a82dd9] | 87 | </seglistitem>
|
---|
| 88 | </segmentedlist>
|
---|
| 89 |
|
---|
| 90 | <variablelist>
|
---|
| 91 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 92 | <?dbfo list-presentation="list"?>
|
---|
| 93 | <?dbhtml list-presentation="table"?>
|
---|
| 94 |
|
---|
| 95 | <varlistentry id="autopoint">
|
---|
| 96 | <term><command>autopoint</command></term>
|
---|
| 97 | <listitem>
|
---|
| 98 | <para>Copies standard Gettext infrastructure files into a source
|
---|
| 99 | package</para>
|
---|
| 100 | <indexterm zone="ch-system-gettext autopoint">
|
---|
| 101 | <primary sortas="b-autopoint">autopoint</primary>
|
---|
| 102 | </indexterm>
|
---|
| 103 | </listitem>
|
---|
| 104 | </varlistentry>
|
---|
| 105 |
|
---|
| 106 | <varlistentry id="envsubst">
|
---|
| 107 | <term><command>envsubst</command></term>
|
---|
| 108 | <listitem>
|
---|
| 109 | <para>Substitutes environment variables in shell format strings</para>
|
---|
| 110 | <indexterm zone="ch-system-gettext envsubst">
|
---|
| 111 | <primary sortas="b-envsubst">envsubst</primary>
|
---|
| 112 | </indexterm>
|
---|
| 113 | </listitem>
|
---|
| 114 | </varlistentry>
|
---|
| 115 |
|
---|
| 116 | <varlistentry id="gettext">
|
---|
| 117 | <term><command>gettext</command></term>
|
---|
| 118 | <listitem>
|
---|
| 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>
|
---|
| 123 | </indexterm>
|
---|
| 124 | </listitem>
|
---|
| 125 | </varlistentry>
|
---|
| 126 |
|
---|
[8bc46a5] | 127 | <varlistentry id="gettext.sh">
|
---|
| 128 | <term><command>gettext.sh</command></term>
|
---|
| 129 | <listitem>
|
---|
| 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>
|
---|
| 133 | </indexterm>
|
---|
| 134 | </listitem>
|
---|
| 135 | </varlistentry>
|
---|
| 136 |
|
---|
[6a82dd9] | 137 | <varlistentry id="gettextize">
|
---|
| 138 | <term><command>gettextize</command></term>
|
---|
| 139 | <listitem>
|
---|
| 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>
|
---|
| 144 | </indexterm>
|
---|
| 145 | </listitem>
|
---|
| 146 | </varlistentry>
|
---|
| 147 |
|
---|
| 148 | <varlistentry id="msgattrib">
|
---|
| 149 | <term><command>msgattrib</command></term>
|
---|
| 150 | <listitem>
|
---|
| 151 | <para>Filters the messages of a translation catalog according to their
|
---|
| 152 | attributes and manipulates the attributes</para>
|
---|
| 153 | <indexterm zone="ch-system-gettext msgattrib">
|
---|
| 154 | <primary sortas="b-msgattrib">msgattrib</primary>
|
---|
| 155 | </indexterm>
|
---|
| 156 | </listitem>
|
---|
| 157 | </varlistentry>
|
---|
| 158 |
|
---|
| 159 | <varlistentry id="msgcat">
|
---|
| 160 | <term><command>msgcat</command></term>
|
---|
| 161 | <listitem>
|
---|
| 162 | <para>Concatenates and merges the given
|
---|
| 163 | <filename class="extension">.po</filename> files</para>
|
---|
| 164 | <indexterm zone="ch-system-gettext msgcat">
|
---|
| 165 | <primary sortas="b-msgcat">msgcat</primary>
|
---|
| 166 | </indexterm>
|
---|
| 167 | </listitem>
|
---|
| 168 | </varlistentry>
|
---|
| 169 |
|
---|
| 170 | <varlistentry id="msgcmp">
|
---|
| 171 | <term><command>msgcmp</command></term>
|
---|
| 172 | <listitem>
|
---|
| 173 | <para>Compares two <filename class="extension">.po</filename>
|
---|
| 174 | files to check that both contain the same set of msgid strings</para>
|
---|
| 175 | <indexterm zone="ch-system-gettext msgcmp">
|
---|
| 176 | <primary sortas="b-msgcmp">msgcmp</primary>
|
---|
| 177 | </indexterm>
|
---|
| 178 | </listitem>
|
---|
| 179 | </varlistentry>
|
---|
| 180 |
|
---|
| 181 | <varlistentry id="msgcomm">
|
---|
| 182 | <term><command>msgcomm</command></term>
|
---|
| 183 | <listitem>
|
---|
[7eac1a5e] | 184 | <para>Finds the messages that are common to the given
|
---|
[6a82dd9] | 185 | <filename class="extension">.po</filename> files</para>
|
---|
| 186 | <indexterm zone="ch-system-gettext msgcomm">
|
---|
| 187 | <primary sortas="b-msgcomm">msgcomm</primary>
|
---|
| 188 | </indexterm>
|
---|
| 189 | </listitem>
|
---|
| 190 | </varlistentry>
|
---|
| 191 |
|
---|
| 192 | <varlistentry id="msgconv">
|
---|
| 193 | <term><command>msgconv</command></term>
|
---|
| 194 | <listitem>
|
---|
| 195 | <para>Converts a translation catalog to a different character
|
---|
| 196 | encoding</para>
|
---|
| 197 | <indexterm zone="ch-system-gettext msgconv">
|
---|
| 198 | <primary sortas="b-msgconv">msgconv</primary>
|
---|
| 199 | </indexterm>
|
---|
| 200 | </listitem>
|
---|
| 201 | </varlistentry>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="msgen">
|
---|
| 204 | <term><command>msgen</command></term>
|
---|
| 205 | <listitem>
|
---|
| 206 | <para>Creates an English translation catalog</para>
|
---|
| 207 | <indexterm zone="ch-system-gettext msgen">
|
---|
| 208 | <primary sortas="b-msgen">msgen</primary>
|
---|
| 209 | </indexterm>
|
---|
| 210 | </listitem>
|
---|
| 211 | </varlistentry>
|
---|
| 212 |
|
---|
| 213 | <varlistentry id="msgexec">
|
---|
| 214 | <term><command>msgexec</command></term>
|
---|
| 215 | <listitem>
|
---|
| 216 | <para>Applies a command to all translations of a translation
|
---|
| 217 | catalog</para>
|
---|
| 218 | <indexterm zone="ch-system-gettext msgexec">
|
---|
| 219 | <primary sortas="b-msgexec">msgexec</primary>
|
---|
| 220 | </indexterm>
|
---|
| 221 | </listitem>
|
---|
| 222 | </varlistentry>
|
---|
| 223 |
|
---|
| 224 | <varlistentry id="msgfilter">
|
---|
| 225 | <term><command>msgfilter</command></term>
|
---|
| 226 | <listitem>
|
---|
| 227 | <para>Applies a filter to all translations of a translation
|
---|
| 228 | catalog</para>
|
---|
| 229 | <indexterm zone="ch-system-gettext msgfilter">
|
---|
| 230 | <primary sortas="b-msgfilter">msgfilter</primary>
|
---|
| 231 | </indexterm>
|
---|
| 232 | </listitem>
|
---|
| 233 | </varlistentry>
|
---|
| 234 |
|
---|
| 235 | <varlistentry id="msgfmt">
|
---|
| 236 | <term><command>msgfmt</command></term>
|
---|
| 237 | <listitem>
|
---|
| 238 | <para>Generates a binary message catalog from a translation
|
---|
| 239 | catalog</para>
|
---|
| 240 | <indexterm zone="ch-system-gettext msgfmt">
|
---|
| 241 | <primary sortas="b-msgfmt">msgfmt</primary>
|
---|
| 242 | </indexterm>
|
---|
| 243 | </listitem>
|
---|
| 244 | </varlistentry>
|
---|
| 245 |
|
---|
| 246 | <varlistentry id="msggrep">
|
---|
| 247 | <term><command>msggrep</command></term>
|
---|
| 248 | <listitem>
|
---|
| 249 | <para>Extracts all messages of a translation catalog that match a
|
---|
| 250 | given pattern or belong to some given source files</para>
|
---|
| 251 | <indexterm zone="ch-system-gettext msggrep">
|
---|
| 252 | <primary sortas="b-msggrep">msggrep</primary>
|
---|
| 253 | </indexterm>
|
---|
| 254 | </listitem>
|
---|
| 255 | </varlistentry>
|
---|
| 256 |
|
---|
| 257 | <varlistentry id="msginit">
|
---|
| 258 | <term><command>msginit</command></term>
|
---|
| 259 | <listitem>
|
---|
| 260 | <para>Creates a new <filename class="extension">.po</filename> file,
|
---|
| 261 | initializing the meta information with values from the user's
|
---|
| 262 | environment</para>
|
---|
| 263 | <indexterm zone="ch-system-gettext msginit">
|
---|
| 264 | <primary sortas="b-msginit">msginit</primary>
|
---|
| 265 | </indexterm>
|
---|
| 266 | </listitem>
|
---|
| 267 | </varlistentry>
|
---|
| 268 |
|
---|
| 269 | <varlistentry id="msgmerge">
|
---|
| 270 | <term><command>msgmerge</command></term>
|
---|
| 271 | <listitem>
|
---|
| 272 | <para>Combines two raw translations into a single file</para>
|
---|
| 273 | <indexterm zone="ch-system-gettext msgmerge">
|
---|
| 274 | <primary sortas="b-msgmerge">msgmerge</primary>
|
---|
| 275 | </indexterm>
|
---|
| 276 | </listitem>
|
---|
| 277 | </varlistentry>
|
---|
| 278 |
|
---|
| 279 | <varlistentry id="msgunfmt">
|
---|
| 280 | <term><command>msgunfmt</command></term>
|
---|
| 281 | <listitem>
|
---|
| 282 | <para>Decompiles a binary message catalog into raw translation
|
---|
| 283 | text</para>
|
---|
| 284 | <indexterm zone="ch-system-gettext msgunfmt">
|
---|
| 285 | <primary sortas="b-msgunfmt">msgunfmt</primary>
|
---|
| 286 | </indexterm>
|
---|
| 287 | </listitem>
|
---|
| 288 | </varlistentry>
|
---|
| 289 |
|
---|
| 290 | <varlistentry id="msguniq">
|
---|
| 291 | <term><command>msguniq</command></term>
|
---|
| 292 | <listitem>
|
---|
| 293 | <para>Unifies duplicate translations in a translation catalog</para>
|
---|
| 294 | <indexterm zone="ch-system-gettext msguniq">
|
---|
| 295 | <primary sortas="b-msguniq">msguniq</primary>
|
---|
| 296 | </indexterm>
|
---|
| 297 | </listitem>
|
---|
| 298 | </varlistentry>
|
---|
| 299 |
|
---|
| 300 | <varlistentry id="ngettext">
|
---|
| 301 | <term><command>ngettext</command></term>
|
---|
| 302 | <listitem>
|
---|
| 303 | <para>Displays native language translations of a textual message whose
|
---|
| 304 | grammatical form depends on a number</para>
|
---|
| 305 | <indexterm zone="ch-system-gettext ngettext">
|
---|
| 306 | <primary sortas="b-ngettext">ngettext</primary>
|
---|
| 307 | </indexterm>
|
---|
| 308 | </listitem>
|
---|
| 309 | </varlistentry>
|
---|
| 310 |
|
---|
[2791a8e] | 311 | <varlistentry id="recode-sr-latin">
|
---|
| 312 | <term><command>recode-sr-latin</command></term>
|
---|
| 313 | <listitem>
|
---|
| 314 | <para>Recodes Serbian text from Cyrillic to Latin script</para>
|
---|
| 315 | <indexterm zone="ch-system-gettext recode-sr-latin">
|
---|
| 316 | <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
|
---|
| 317 | </indexterm>
|
---|
| 318 | </listitem>
|
---|
| 319 | </varlistentry>
|
---|
| 320 |
|
---|
[6a82dd9] | 321 | <varlistentry id="xgettext">
|
---|
| 322 | <term><command>xgettext</command></term>
|
---|
| 323 | <listitem>
|
---|
| 324 | <para>Extracts the translatable message lines from the given source
|
---|
| 325 | files to make the first translation template</para>
|
---|
| 326 | <indexterm zone="ch-system-gettext xgettext">
|
---|
| 327 | <primary sortas="b-xgettext">xgettext</primary>
|
---|
| 328 | </indexterm>
|
---|
| 329 | </listitem>
|
---|
| 330 | </varlistentry>
|
---|
| 331 |
|
---|
| 332 | <varlistentry id="libasprintf">
|
---|
| 333 | <term><filename class="libraryfile">libasprintf</filename></term>
|
---|
| 334 | <listitem>
|
---|
| 335 | <para>defines the <emphasis>autosprintf</emphasis> class, which makes
|
---|
| 336 | C formatted output routines usable in C++ programs, for use with the
|
---|
| 337 | <emphasis><string></emphasis> strings and the
|
---|
| 338 | <emphasis><iostream></emphasis> streams</para>
|
---|
| 339 | <indexterm zone="ch-system-gettext libasprintf">
|
---|
| 340 | <primary sortas="c-libasprintf">libasprintf</primary>
|
---|
| 341 | </indexterm>
|
---|
| 342 | </listitem>
|
---|
| 343 | </varlistentry>
|
---|
| 344 |
|
---|
| 345 | <varlistentry id="libgettextlib">
|
---|
| 346 | <term><filename class="libraryfile">libgettextlib</filename></term>
|
---|
| 347 | <listitem>
|
---|
| 348 | <para>a private library containing common routines used by the
|
---|
| 349 | various Gettext programs; these are not intended for general use</para>
|
---|
| 350 | <indexterm zone="ch-system-gettext libgettextlib">
|
---|
| 351 | <primary sortas="c-libgettextlib">libgettextlib</primary>
|
---|
| 352 | </indexterm>
|
---|
| 353 | </listitem>
|
---|
| 354 | </varlistentry>
|
---|
| 355 |
|
---|
| 356 | <varlistentry id="libgettextpo">
|
---|
| 357 | <term><filename class="libraryfile">libgettextpo</filename></term>
|
---|
| 358 | <listitem>
|
---|
| 359 | <para>Used to write specialized programs that process
|
---|
| 360 | <filename class="extension">.po</filename> files; this library is
|
---|
| 361 | used when the standard applications shipped with Gettext (such as
|
---|
| 362 | <command>msgcomm</command>, <command>msgcmp</command>,
|
---|
| 363 | <command>msgattrib</command>, and <command>msgen</command>) will
|
---|
| 364 | not suffice</para>
|
---|
| 365 | <indexterm zone="ch-system-gettext libgettextpo">
|
---|
| 366 | <primary sortas="c-libgettextpo">libgettextpo</primary>
|
---|
| 367 | </indexterm>
|
---|
| 368 | </listitem>
|
---|
| 369 | </varlistentry>
|
---|
| 370 |
|
---|
| 371 | <varlistentry id="libgettextsrc">
|
---|
| 372 | <term><filename class="libraryfile">libgettextsrc</filename></term>
|
---|
| 373 | <listitem>
|
---|
| 374 | <para>A private library containing common routines used by the
|
---|
| 375 | various Gettext programs; these are not intended for general use</para>
|
---|
| 376 | <indexterm zone="ch-system-gettext libgettextsrc">
|
---|
| 377 | <primary sortas="c-libgettextsrc">libgettextsrc</primary>
|
---|
| 378 | </indexterm>
|
---|
| 379 | </listitem>
|
---|
| 380 | </varlistentry>
|
---|
| 381 |
|
---|
[afba93b] | 382 | <varlistentry id="preloadable_libintl">
|
---|
[873f3aa] | 383 | <term><filename class="libraryfile">preloadable_libintl</filename></term>
|
---|
| 384 | <listitem>
|
---|
| 385 | <para>A library, intended to be used by LD_PRELOAD that assists
|
---|
| 386 | <filename class="libraryfile">libintl</filename> in logging
|
---|
[afba93b] | 387 | untranslated messages</para>
|
---|
| 388 | <indexterm zone="ch-system-gettext preloadable_libintl">
|
---|
| 389 | <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
|
---|
[873f3aa] | 390 | </indexterm>
|
---|
| 391 | </listitem>
|
---|
| 392 | </varlistentry>
|
---|
[6a82dd9] | 393 | </variablelist>
|
---|
| 394 |
|
---|
| 395 | </sect2>
|
---|
[673b0d8] | 396 |
|
---|
| 397 | </sect1>
|
---|