gettext.xml 15 KB

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