gettext.xml 15 KB

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