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