gettext.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  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. <title>Gettext-&gettext-version;</title>
  10. <indexterm zone="ch-system-gettext">
  11. <primary sortas="a-Gettext">Gettext</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Gettext package contains utilities for internationalization and
  16. localization. These allow programs to be compiled with NLS (Native Language
  17. Support), enabling them to output messages in the user's native
  18. language.</para>
  19. <segmentedlist>
  20. <segtitle>&buildtime;</segtitle>
  21. <segtitle>&diskspace;</segtitle>
  22. <seglistitem>
  23. <seg>&gettext-ch6-sbu;</seg>
  24. <seg>&gettext-ch6-du;</seg>
  25. </seglistitem>
  26. </segmentedlist>
  27. </sect2>
  28. <sect2 role="installation">
  29. <title>Installation of Gettext</title>
  30. <para>Prepare Gettext for compilation:</para>
  31. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  32. <para>Compile the package:</para>
  33. <screen><userinput>make</userinput></screen>
  34. <para>To test the results, issue:
  35. <userinput>make check</userinput>.
  36. This takes a very long time, around 5 SBUs.</para>
  37. <para>Install the package:</para>
  38. <screen><userinput>make install</userinput></screen>
  39. </sect2>
  40. <sect2 id="contents-gettext" role="content">
  41. <title>Contents of Gettext</title>
  42. <segmentedlist>
  43. <segtitle>Installed programs</segtitle>
  44. <segtitle>Installed libraries</segtitle>
  45. <seglistitem>
  46. <seg>autopoint, config.charset, config.rpath, envsubst, gettext, gettext.sh,
  47. gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
  48. msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
  49. ngettext, and xgettext</seg>
  50. <seg>libasprintf.{a,so}, libgettextlib.so, libgettextpo.{a,so}, and
  51. libgettextsrc.so</seg>
  52. </seglistitem>
  53. </segmentedlist>
  54. <variablelist>
  55. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  56. <?dbfo list-presentation="list"?>
  57. <?dbhtml list-presentation="table"?>
  58. <varlistentry id="autopoint">
  59. <term><command>autopoint</command></term>
  60. <listitem>
  61. <para>Copies standard Gettext infrastructure files into a source
  62. package</para>
  63. <indexterm zone="ch-system-gettext autopoint">
  64. <primary sortas="b-autopoint">autopoint</primary>
  65. </indexterm>
  66. </listitem>
  67. </varlistentry>
  68. <varlistentry id="config.charset">
  69. <term><command>config.charset</command></term>
  70. <listitem>
  71. <para>Outputs a system-dependent table of character encoding
  72. aliases</para>
  73. <indexterm zone="ch-system-gettext config.charset">
  74. <primary sortas="b-config.charset">config.charset</primary>
  75. </indexterm>
  76. </listitem>
  77. </varlistentry>
  78. <varlistentry id="config.rpath">
  79. <term><command>config.rpath</command></term>
  80. <listitem>
  81. <para>Outputs a system-dependent set of variables, describing how
  82. to set the runtime search path of shared libraries in an
  83. executable</para>
  84. <indexterm zone="ch-system-gettext config.rpath">
  85. <primary sortas="b-config.rpath">config.rpath</primary>
  86. </indexterm>
  87. </listitem>
  88. </varlistentry>
  89. <varlistentry id="envsubst">
  90. <term><command>envsubst</command></term>
  91. <listitem>
  92. <para>Substitutes environment variables in shell format strings</para>
  93. <indexterm zone="ch-system-gettext envsubst">
  94. <primary sortas="b-envsubst">envsubst</primary>
  95. </indexterm>
  96. </listitem>
  97. </varlistentry>
  98. <varlistentry id="gettext">
  99. <term><command>gettext</command></term>
  100. <listitem>
  101. <para>Translates a natural language message into the user's language
  102. by looking up the translation in a message catalog</para>
  103. <indexterm zone="ch-system-gettext gettext">
  104. <primary sortas="b-gettext">gettext</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="gettext.sh">
  109. <term><command>gettext.sh</command></term>
  110. <listitem>
  111. <para>Primarily serves as a shell function library for gettext</para>
  112. <indexterm zone="ch-system-gettext gettext.sh">
  113. <primary sortas="b-gettext.sh">gettext.sh</primary>
  114. </indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="gettextize">
  118. <term><command>gettextize</command></term>
  119. <listitem>
  120. <para>Copies all standard Gettext files into the given top-level
  121. directory of a package to begin internationalizing it</para>
  122. <indexterm zone="ch-system-gettext gettextize">
  123. <primary sortas="b-gettextize">gettextize</primary>
  124. </indexterm>
  125. </listitem>
  126. </varlistentry>
  127. <varlistentry id="hostname-gettext">
  128. <term><command>hostname</command></term>
  129. <listitem>
  130. <para>Displays a network hostname in various forms</para>
  131. <indexterm zone="ch-system-gettext hostname-gettext">
  132. <primary sortas="b-hostname-gettext">hostname</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="msgattrib">
  137. <term><command>msgattrib</command></term>
  138. <listitem>
  139. <para>Filters the messages of a translation catalog according to their
  140. attributes and manipulates the attributes</para>
  141. <indexterm zone="ch-system-gettext msgattrib">
  142. <primary sortas="b-msgattrib">msgattrib</primary>
  143. </indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="msgcat">
  147. <term><command>msgcat</command></term>
  148. <listitem>
  149. <para>Concatenates and merges the given
  150. <filename class="extension">.po</filename> files</para>
  151. <indexterm zone="ch-system-gettext msgcat">
  152. <primary sortas="b-msgcat">msgcat</primary>
  153. </indexterm>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry id="msgcmp">
  157. <term><command>msgcmp</command></term>
  158. <listitem>
  159. <para>Compares two <filename class="extension">.po</filename>
  160. files to check that both contain the same set of msgid strings</para>
  161. <indexterm zone="ch-system-gettext msgcmp">
  162. <primary sortas="b-msgcmp">msgcmp</primary>
  163. </indexterm>
  164. </listitem>
  165. </varlistentry>
  166. <varlistentry id="msgcomm">
  167. <term><command>msgcomm</command></term>
  168. <listitem>
  169. <para>Finds the messages that are common to to the given
  170. <filename class="extension">.po</filename> files</para>
  171. <indexterm zone="ch-system-gettext msgcomm">
  172. <primary sortas="b-msgcomm">msgcomm</primary>
  173. </indexterm>
  174. </listitem>
  175. </varlistentry>
  176. <varlistentry id="msgconv">
  177. <term><command>msgconv</command></term>
  178. <listitem>
  179. <para>Converts a translation catalog to a different character
  180. encoding</para>
  181. <indexterm zone="ch-system-gettext msgconv">
  182. <primary sortas="b-msgconv">msgconv</primary>
  183. </indexterm>
  184. </listitem>
  185. </varlistentry>
  186. <varlistentry id="msgen">
  187. <term><command>msgen</command></term>
  188. <listitem>
  189. <para>Creates an English translation catalog</para>
  190. <indexterm zone="ch-system-gettext msgen">
  191. <primary sortas="b-msgen">msgen</primary>
  192. </indexterm>
  193. </listitem>
  194. </varlistentry>
  195. <varlistentry id="msgexec">
  196. <term><command>msgexec</command></term>
  197. <listitem>
  198. <para>Applies a command to all translations of a translation
  199. catalog</para>
  200. <indexterm zone="ch-system-gettext msgexec">
  201. <primary sortas="b-msgexec">msgexec</primary>
  202. </indexterm>
  203. </listitem>
  204. </varlistentry>
  205. <varlistentry id="msgfilter">
  206. <term><command>msgfilter</command></term>
  207. <listitem>
  208. <para>Applies a filter to all translations of a translation
  209. catalog</para>
  210. <indexterm zone="ch-system-gettext msgfilter">
  211. <primary sortas="b-msgfilter">msgfilter</primary>
  212. </indexterm>
  213. </listitem>
  214. </varlistentry>
  215. <varlistentry id="msgfmt">
  216. <term><command>msgfmt</command></term>
  217. <listitem>
  218. <para>Generates a binary message catalog from a translation
  219. catalog</para>
  220. <indexterm zone="ch-system-gettext msgfmt">
  221. <primary sortas="b-msgfmt">msgfmt</primary>
  222. </indexterm>
  223. </listitem>
  224. </varlistentry>
  225. <varlistentry id="msggrep">
  226. <term><command>msggrep</command></term>
  227. <listitem>
  228. <para>Extracts all messages of a translation catalog that match a
  229. given pattern or belong to some given source files</para>
  230. <indexterm zone="ch-system-gettext msggrep">
  231. <primary sortas="b-msggrep">msggrep</primary>
  232. </indexterm>
  233. </listitem>
  234. </varlistentry>
  235. <varlistentry id="msginit">
  236. <term><command>msginit</command></term>
  237. <listitem>
  238. <para>Creates a new <filename class="extension">.po</filename> file,
  239. initializing the meta information with values from the user's
  240. environment</para>
  241. <indexterm zone="ch-system-gettext msginit">
  242. <primary sortas="b-msginit">msginit</primary>
  243. </indexterm>
  244. </listitem>
  245. </varlistentry>
  246. <varlistentry id="msgmerge">
  247. <term><command>msgmerge</command></term>
  248. <listitem>
  249. <para>Combines two raw translations into a single file</para>
  250. <indexterm zone="ch-system-gettext msgmerge">
  251. <primary sortas="b-msgmerge">msgmerge</primary>
  252. </indexterm>
  253. </listitem>
  254. </varlistentry>
  255. <varlistentry id="msgunfmt">
  256. <term><command>msgunfmt</command></term>
  257. <listitem>
  258. <para>Decompiles a binary message catalog into raw translation
  259. text</para>
  260. <indexterm zone="ch-system-gettext msgunfmt">
  261. <primary sortas="b-msgunfmt">msgunfmt</primary>
  262. </indexterm>
  263. </listitem>
  264. </varlistentry>
  265. <varlistentry id="msguniq">
  266. <term><command>msguniq</command></term>
  267. <listitem>
  268. <para>Unifies duplicate translations in a translation catalog</para>
  269. <indexterm zone="ch-system-gettext msguniq">
  270. <primary sortas="b-msguniq">msguniq</primary>
  271. </indexterm>
  272. </listitem>
  273. </varlistentry>
  274. <varlistentry id="ngettext">
  275. <term><command>ngettext</command></term>
  276. <listitem>
  277. <para>Displays native language translations of a textual message whose
  278. grammatical form depends on a number</para>
  279. <indexterm zone="ch-system-gettext ngettext">
  280. <primary sortas="b-ngettext">ngettext</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. </variablelist>
  341. </sect2>
  342. </sect1>