gettext.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  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, 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="msgattrib">
  119. <term><command>msgattrib</command></term>
  120. <listitem>
  121. <para>Filters the messages of a translation catalog according to their
  122. attributes and manipulates the attributes</para>
  123. <indexterm zone="ch-system-gettext msgattrib">
  124. <primary sortas="b-msgattrib">msgattrib</primary>
  125. </indexterm>
  126. </listitem>
  127. </varlistentry>
  128. <varlistentry id="msgcat">
  129. <term><command>msgcat</command></term>
  130. <listitem>
  131. <para>Concatenates and merges the given
  132. <filename class="extension">.po</filename> files</para>
  133. <indexterm zone="ch-system-gettext msgcat">
  134. <primary sortas="b-msgcat">msgcat</primary>
  135. </indexterm>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="msgcmp">
  139. <term><command>msgcmp</command></term>
  140. <listitem>
  141. <para>Compares two <filename class="extension">.po</filename>
  142. files to check that both contain the same set of msgid strings</para>
  143. <indexterm zone="ch-system-gettext msgcmp">
  144. <primary sortas="b-msgcmp">msgcmp</primary>
  145. </indexterm>
  146. </listitem>
  147. </varlistentry>
  148. <varlistentry id="msgcomm">
  149. <term><command>msgcomm</command></term>
  150. <listitem>
  151. <para>Finds the messages that are common to the given
  152. <filename class="extension">.po</filename> files</para>
  153. <indexterm zone="ch-system-gettext msgcomm">
  154. <primary sortas="b-msgcomm">msgcomm</primary>
  155. </indexterm>
  156. </listitem>
  157. </varlistentry>
  158. <varlistentry id="msgconv">
  159. <term><command>msgconv</command></term>
  160. <listitem>
  161. <para>Converts a translation catalog to a different character
  162. encoding</para>
  163. <indexterm zone="ch-system-gettext msgconv">
  164. <primary sortas="b-msgconv">msgconv</primary>
  165. </indexterm>
  166. </listitem>
  167. </varlistentry>
  168. <varlistentry id="msgen">
  169. <term><command>msgen</command></term>
  170. <listitem>
  171. <para>Creates an English translation catalog</para>
  172. <indexterm zone="ch-system-gettext msgen">
  173. <primary sortas="b-msgen">msgen</primary>
  174. </indexterm>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry id="msgexec">
  178. <term><command>msgexec</command></term>
  179. <listitem>
  180. <para>Applies a command to all translations of a translation
  181. catalog</para>
  182. <indexterm zone="ch-system-gettext msgexec">
  183. <primary sortas="b-msgexec">msgexec</primary>
  184. </indexterm>
  185. </listitem>
  186. </varlistentry>
  187. <varlistentry id="msgfilter">
  188. <term><command>msgfilter</command></term>
  189. <listitem>
  190. <para>Applies a filter to all translations of a translation
  191. catalog</para>
  192. <indexterm zone="ch-system-gettext msgfilter">
  193. <primary sortas="b-msgfilter">msgfilter</primary>
  194. </indexterm>
  195. </listitem>
  196. </varlistentry>
  197. <varlistentry id="msgfmt">
  198. <term><command>msgfmt</command></term>
  199. <listitem>
  200. <para>Generates a binary message catalog from a translation
  201. catalog</para>
  202. <indexterm zone="ch-system-gettext msgfmt">
  203. <primary sortas="b-msgfmt">msgfmt</primary>
  204. </indexterm>
  205. </listitem>
  206. </varlistentry>
  207. <varlistentry id="msggrep">
  208. <term><command>msggrep</command></term>
  209. <listitem>
  210. <para>Extracts all messages of a translation catalog that match a
  211. given pattern or belong to some given source files</para>
  212. <indexterm zone="ch-system-gettext msggrep">
  213. <primary sortas="b-msggrep">msggrep</primary>
  214. </indexterm>
  215. </listitem>
  216. </varlistentry>
  217. <varlistentry id="msginit">
  218. <term><command>msginit</command></term>
  219. <listitem>
  220. <para>Creates a new <filename class="extension">.po</filename> file,
  221. initializing the meta information with values from the user's
  222. environment</para>
  223. <indexterm zone="ch-system-gettext msginit">
  224. <primary sortas="b-msginit">msginit</primary>
  225. </indexterm>
  226. </listitem>
  227. </varlistentry>
  228. <varlistentry id="msgmerge">
  229. <term><command>msgmerge</command></term>
  230. <listitem>
  231. <para>Combines two raw translations into a single file</para>
  232. <indexterm zone="ch-system-gettext msgmerge">
  233. <primary sortas="b-msgmerge">msgmerge</primary>
  234. </indexterm>
  235. </listitem>
  236. </varlistentry>
  237. <varlistentry id="msgunfmt">
  238. <term><command>msgunfmt</command></term>
  239. <listitem>
  240. <para>Decompiles a binary message catalog into raw translation
  241. text</para>
  242. <indexterm zone="ch-system-gettext msgunfmt">
  243. <primary sortas="b-msgunfmt">msgunfmt</primary>
  244. </indexterm>
  245. </listitem>
  246. </varlistentry>
  247. <varlistentry id="msguniq">
  248. <term><command>msguniq</command></term>
  249. <listitem>
  250. <para>Unifies duplicate translations in a translation catalog</para>
  251. <indexterm zone="ch-system-gettext msguniq">
  252. <primary sortas="b-msguniq">msguniq</primary>
  253. </indexterm>
  254. </listitem>
  255. </varlistentry>
  256. <varlistentry id="ngettext">
  257. <term><command>ngettext</command></term>
  258. <listitem>
  259. <para>Displays native language translations of a textual message whose
  260. grammatical form depends on a number</para>
  261. <indexterm zone="ch-system-gettext ngettext">
  262. <primary sortas="b-ngettext">ngettext</primary>
  263. </indexterm>
  264. </listitem>
  265. </varlistentry>
  266. <varlistentry id="recode-sr-latin">
  267. <term><command>recode-sr-latin</command></term>
  268. <listitem>
  269. <para>Recodes Serbian text from Cyrillic to Latin script</para>
  270. <indexterm zone="ch-system-gettext recode-sr-latin">
  271. <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
  272. </indexterm>
  273. </listitem>
  274. </varlistentry>
  275. <varlistentry id="xgettext">
  276. <term><command>xgettext</command></term>
  277. <listitem>
  278. <para>Extracts the translatable message lines from the given source
  279. files to make the first translation template</para>
  280. <indexterm zone="ch-system-gettext xgettext">
  281. <primary sortas="b-xgettext">xgettext</primary>
  282. </indexterm>
  283. </listitem>
  284. </varlistentry>
  285. <varlistentry id="libasprintf">
  286. <term><filename class="libraryfile">libasprintf</filename></term>
  287. <listitem>
  288. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  289. C formatted output routines usable in C++ programs, for use with the
  290. <emphasis>&lt;string&gt;</emphasis> strings and the
  291. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  292. <indexterm zone="ch-system-gettext libasprintf">
  293. <primary sortas="c-libasprintf">libasprintf</primary>
  294. </indexterm>
  295. </listitem>
  296. </varlistentry>
  297. <varlistentry id="libgettextlib">
  298. <term><filename class="libraryfile">libgettextlib</filename></term>
  299. <listitem>
  300. <para>a private library containing common routines used by the
  301. various Gettext programs; these are not intended for general use</para>
  302. <indexterm zone="ch-system-gettext libgettextlib">
  303. <primary sortas="c-libgettextlib">libgettextlib</primary>
  304. </indexterm>
  305. </listitem>
  306. </varlistentry>
  307. <varlistentry id="libgettextpo">
  308. <term><filename class="libraryfile">libgettextpo</filename></term>
  309. <listitem>
  310. <para>Used to write specialized programs that process
  311. <filename class="extension">.po</filename> files; this library is
  312. used when the standard applications shipped with Gettext (such as
  313. <command>msgcomm</command>, <command>msgcmp</command>,
  314. <command>msgattrib</command>, and <command>msgen</command>) will
  315. not suffice</para>
  316. <indexterm zone="ch-system-gettext libgettextpo">
  317. <primary sortas="c-libgettextpo">libgettextpo</primary>
  318. </indexterm>
  319. </listitem>
  320. </varlistentry>
  321. <varlistentry id="libgettextsrc">
  322. <term><filename class="libraryfile">libgettextsrc</filename></term>
  323. <listitem>
  324. <para>A private library containing common routines used by the
  325. various Gettext programs; these are not intended for general use</para>
  326. <indexterm zone="ch-system-gettext libgettextsrc">
  327. <primary sortas="c-libgettextsrc">libgettextsrc</primary>
  328. </indexterm>
  329. </listitem>
  330. </varlistentry>
  331. <varlistentry id="preloadable_libintl">
  332. <term><filename class="libraryfile">preloadable_libintl</filename></term>
  333. <listitem>
  334. <para>A library, intended to be used by LD_PRELOAD that assists
  335. <filename class="libraryfile">libintl</filename> in logging
  336. untranslated messages</para>
  337. <indexterm zone="ch-system-gettext preloadable_libintl">
  338. <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
  339. </indexterm>
  340. </listitem>
  341. </varlistentry>
  342. </variablelist>
  343. </sect2>
  344. </sect1>