gettext.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.4/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>1.2 SBU</seg>
  24. <seg>65.1 MB</seg>
  25. </seglistitem>
  26. </segmentedlist>
  27. <segmentedlist>
  28. <segtitle>&dependencies;</segtitle>
  29. <seglistitem>
  30. <seg>Bash, Binutils, Bison, Coreutils, Diffutils, Gawk, GCC, Glibc,
  31. Grep, Make, and Sed</seg>
  32. </seglistitem>
  33. </segmentedlist>
  34. </sect2>
  35. <sect2 role="installation">
  36. <title>Installation of Gettext</title>
  37. <para>Prepare Gettext for compilation:</para>
  38. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  39. <para>Compile the package:</para>
  40. <screen><userinput>make</userinput></screen>
  41. <para>To test the results, issue:
  42. <userinput>make check</userinput>.
  43. This takes a very long time, around 7 SBUs.</para>
  44. <para>Install the package:</para>
  45. <screen><userinput>make install</userinput></screen>
  46. </sect2>
  47. <sect2 id="contents-gettext" role="content">
  48. <title>Contents of Gettext</title>
  49. <segmentedlist>
  50. <segtitle>Installed programs</segtitle>
  51. <segtitle>Installed libraries</segtitle>
  52. <seglistitem>
  53. <seg>autopoint, config.charset, config.rpath, envsubst, gettext,
  54. gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
  55. msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
  56. ngettext, and xgettext</seg>
  57. <seg>libasprintf.[a,so], libgettextlib.so, libgettextpo.[a,so], and
  58. libgettextsrc.so</seg>
  59. </seglistitem>
  60. </segmentedlist>
  61. <variablelist>
  62. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  63. <?dbfo list-presentation="list"?>
  64. <?dbhtml list-presentation="table"?>
  65. <varlistentry id="autopoint">
  66. <term><command>autopoint</command></term>
  67. <listitem>
  68. <para>Copies standard Gettext infrastructure files into a source
  69. package</para>
  70. <indexterm zone="ch-system-gettext autopoint">
  71. <primary sortas="b-autopoint">autopoint</primary>
  72. </indexterm>
  73. </listitem>
  74. </varlistentry>
  75. <varlistentry id="config.charset">
  76. <term><command>config.charset</command></term>
  77. <listitem>
  78. <para>Outputs a system-dependent table of character encoding
  79. aliases</para>
  80. <indexterm zone="ch-system-gettext config.charset">
  81. <primary sortas="b-config.charset">config.charset</primary>
  82. </indexterm>
  83. </listitem>
  84. </varlistentry>
  85. <varlistentry id="config.rpath">
  86. <term><command>config.rpath</command></term>
  87. <listitem>
  88. <para>Outputs a system-dependent set of variables, describing how
  89. to set the runtime search path of shared libraries in an
  90. executable</para>
  91. <indexterm zone="ch-system-gettext config.rpath">
  92. <primary sortas="b-config.rpath">config.rpath</primary>
  93. </indexterm>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry id="envsubst">
  97. <term><command>envsubst</command></term>
  98. <listitem>
  99. <para>Substitutes environment variables in shell format strings</para>
  100. <indexterm zone="ch-system-gettext envsubst">
  101. <primary sortas="b-envsubst">envsubst</primary>
  102. </indexterm>
  103. </listitem>
  104. </varlistentry>
  105. <varlistentry id="gettext">
  106. <term><command>gettext</command></term>
  107. <listitem>
  108. <para>Translates a natural language message into the user's language
  109. by looking up the translation in a message catalog</para>
  110. <indexterm zone="ch-system-gettext gettext">
  111. <primary sortas="b-gettext">gettext</primary>
  112. </indexterm>
  113. </listitem>
  114. </varlistentry>
  115. <varlistentry id="gettextize">
  116. <term><command>gettextize</command></term>
  117. <listitem>
  118. <para>Copies all standard Gettext files into the given top-level
  119. directory of a package to begin internationalizing it</para>
  120. <indexterm zone="ch-system-gettext gettextize">
  121. <primary sortas="b-gettextize">gettextize</primary>
  122. </indexterm>
  123. </listitem>
  124. </varlistentry>
  125. <varlistentry id="hostname-gettext">
  126. <term><command>hostname</command></term>
  127. <listitem>
  128. <para>Displays a network hostname in various forms</para>
  129. <indexterm zone="ch-system-gettext hostname-gettext">
  130. <primary sortas="b-hostname-gettext">hostname</primary>
  131. </indexterm>
  132. </listitem>
  133. </varlistentry>
  134. <varlistentry id="msgattrib">
  135. <term><command>msgattrib</command></term>
  136. <listitem>
  137. <para>Filters the messages of a translation catalog according to their
  138. attributes and manipulates the attributes</para>
  139. <indexterm zone="ch-system-gettext msgattrib">
  140. <primary sortas="b-msgattrib">msgattrib</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="msgcat">
  145. <term><command>msgcat</command></term>
  146. <listitem>
  147. <para>Concatenates and merges the given
  148. <filename class="extension">.po</filename> files</para>
  149. <indexterm zone="ch-system-gettext msgcat">
  150. <primary sortas="b-msgcat">msgcat</primary>
  151. </indexterm>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry id="msgcmp">
  155. <term><command>msgcmp</command></term>
  156. <listitem>
  157. <para>Compares two <filename class="extension">.po</filename>
  158. files to check that both contain the same set of msgid strings</para>
  159. <indexterm zone="ch-system-gettext msgcmp">
  160. <primary sortas="b-msgcmp">msgcmp</primary>
  161. </indexterm>
  162. </listitem>
  163. </varlistentry>
  164. <varlistentry id="msgcomm">
  165. <term><command>msgcomm</command></term>
  166. <listitem>
  167. <para>Finds the messages that are common to to the given
  168. <filename class="extension">.po</filename> files</para>
  169. <indexterm zone="ch-system-gettext msgcomm">
  170. <primary sortas="b-msgcomm">msgcomm</primary>
  171. </indexterm>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry id="msgconv">
  175. <term><command>msgconv</command></term>
  176. <listitem>
  177. <para>Converts a translation catalog to a different character
  178. encoding</para>
  179. <indexterm zone="ch-system-gettext msgconv">
  180. <primary sortas="b-msgconv">msgconv</primary>
  181. </indexterm>
  182. </listitem>
  183. </varlistentry>
  184. <varlistentry id="msgen">
  185. <term><command>msgen</command></term>
  186. <listitem>
  187. <para>Creates an English translation catalog</para>
  188. <indexterm zone="ch-system-gettext msgen">
  189. <primary sortas="b-msgen">msgen</primary>
  190. </indexterm>
  191. </listitem>
  192. </varlistentry>
  193. <varlistentry id="msgexec">
  194. <term><command>msgexec</command></term>
  195. <listitem>
  196. <para>Applies a command to all translations of a translation
  197. catalog</para>
  198. <indexterm zone="ch-system-gettext msgexec">
  199. <primary sortas="b-msgexec">msgexec</primary>
  200. </indexterm>
  201. </listitem>
  202. </varlistentry>
  203. <varlistentry id="msgfilter">
  204. <term><command>msgfilter</command></term>
  205. <listitem>
  206. <para>Applies a filter to all translations of a translation
  207. catalog</para>
  208. <indexterm zone="ch-system-gettext msgfilter">
  209. <primary sortas="b-msgfilter">msgfilter</primary>
  210. </indexterm>
  211. </listitem>
  212. </varlistentry>
  213. <varlistentry id="msgfmt">
  214. <term><command>msgfmt</command></term>
  215. <listitem>
  216. <para>Generates a binary message catalog from a translation
  217. catalog</para>
  218. <indexterm zone="ch-system-gettext msgfmt">
  219. <primary sortas="b-msgfmt">msgfmt</primary>
  220. </indexterm>
  221. </listitem>
  222. </varlistentry>
  223. <varlistentry id="msggrep">
  224. <term><command>msggrep</command></term>
  225. <listitem>
  226. <para>Extracts all messages of a translation catalog that match a
  227. given pattern or belong to some given source files</para>
  228. <indexterm zone="ch-system-gettext msggrep">
  229. <primary sortas="b-msggrep">msggrep</primary>
  230. </indexterm>
  231. </listitem>
  232. </varlistentry>
  233. <varlistentry id="msginit">
  234. <term><command>msginit</command></term>
  235. <listitem>
  236. <para>Creates a new <filename class="extension">.po</filename> file,
  237. initializing the meta information with values from the user's
  238. environment</para>
  239. <indexterm zone="ch-system-gettext msginit">
  240. <primary sortas="b-msginit">msginit</primary>
  241. </indexterm>
  242. </listitem>
  243. </varlistentry>
  244. <varlistentry id="msgmerge">
  245. <term><command>msgmerge</command></term>
  246. <listitem>
  247. <para>Combines two raw translations into a single file</para>
  248. <indexterm zone="ch-system-gettext msgmerge">
  249. <primary sortas="b-msgmerge">msgmerge</primary>
  250. </indexterm>
  251. </listitem>
  252. </varlistentry>
  253. <varlistentry id="msgunfmt">
  254. <term><command>msgunfmt</command></term>
  255. <listitem>
  256. <para>Decompiles a binary message catalog into raw translation
  257. text</para>
  258. <indexterm zone="ch-system-gettext msgunfmt">
  259. <primary sortas="b-msgunfmt">msgunfmt</primary>
  260. </indexterm>
  261. </listitem>
  262. </varlistentry>
  263. <varlistentry id="msguniq">
  264. <term><command>msguniq</command></term>
  265. <listitem>
  266. <para>Unifies duplicate translations in a translation catalog</para>
  267. <indexterm zone="ch-system-gettext msguniq">
  268. <primary sortas="b-msguniq">msguniq</primary>
  269. </indexterm>
  270. </listitem>
  271. </varlistentry>
  272. <varlistentry id="ngettext">
  273. <term><command>ngettext</command></term>
  274. <listitem>
  275. <para>Displays native language translations of a textual message whose
  276. grammatical form depends on a number</para>
  277. <indexterm zone="ch-system-gettext ngettext">
  278. <primary sortas="b-ngettext">ngettext</primary>
  279. </indexterm>
  280. </listitem>
  281. </varlistentry>
  282. <varlistentry id="xgettext">
  283. <term><command>xgettext</command></term>
  284. <listitem>
  285. <para>Extracts the translatable message lines from the given source
  286. files to make the first translation template</para>
  287. <indexterm zone="ch-system-gettext xgettext">
  288. <primary sortas="b-xgettext">xgettext</primary>
  289. </indexterm>
  290. </listitem>
  291. </varlistentry>
  292. <varlistentry id="libasprintf">
  293. <term><filename class="libraryfile">libasprintf</filename></term>
  294. <listitem>
  295. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  296. C formatted output routines usable in C++ programs, for use with the
  297. <emphasis>&lt;string&gt;</emphasis> strings and the
  298. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  299. <indexterm zone="ch-system-gettext libasprintf">
  300. <primary sortas="c-libasprintf">libasprintf</primary>
  301. </indexterm>
  302. </listitem>
  303. </varlistentry>
  304. <varlistentry id="libgettextlib">
  305. <term><filename class="libraryfile">libgettextlib</filename></term>
  306. <listitem>
  307. <para>a private library containing common routines used by the
  308. various Gettext programs; these are not intended for general use</para>
  309. <indexterm zone="ch-system-gettext libgettextlib">
  310. <primary sortas="c-libgettextlib">libgettextlib</primary>
  311. </indexterm>
  312. </listitem>
  313. </varlistentry>
  314. <varlistentry id="libgettextpo">
  315. <term><filename class="libraryfile">libgettextpo</filename></term>
  316. <listitem>
  317. <para>Used to write specialized programs that process
  318. <filename class="extension">.po</filename> files; this library is
  319. used when the standard applications shipped with Gettext (such as
  320. <command>msgcomm</command>, <command>msgcmp</command>,
  321. <command>msgattrib</command>, and <command>msgen</command>) will
  322. not suffice</para>
  323. <indexterm zone="ch-system-gettext libgettextpo">
  324. <primary sortas="c-libgettextpo">libgettextpo</primary>
  325. </indexterm>
  326. </listitem>
  327. </varlistentry>
  328. <varlistentry id="libgettextsrc">
  329. <term><filename class="libraryfile">libgettextsrc</filename></term>
  330. <listitem>
  331. <para>A private library containing common routines used by the
  332. various Gettext programs; these are not intended for general use</para>
  333. <indexterm zone="ch-system-gettext libgettextsrc">
  334. <primary sortas="c-libgettextsrc">libgettextsrc</primary>
  335. </indexterm>
  336. </listitem>
  337. </varlistentry>
  338. </variablelist>
  339. </sect2>
  340. </sect1>