gettext.xml 15 KB

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