gettext.xml 15 KB

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