gettext.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  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-fin-sbu;</seg>
  29. <seg>&gettext-fin-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. --disable-static \
  38. --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
  39. <para>Compile the package:</para>
  40. <!--<screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>-->
  41. <screen><userinput remap="make">make</userinput></screen>
  42. <!--
  43. <variablelist>
  44. <title>The meaning of the make parameter:</title>
  45. <varlistentry>
  46. <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term>
  47. <listitem>
  48. <para>Since bison is not yet installed in /usr, configure hardcodes
  49. the directory containing translations for the bison program (the
  50. "locale" directory) as /tools/share/locale. Passing this variable
  51. to make allows overriding the choice made by configure.</para>
  52. </listitem>
  53. </varlistentry>
  54. </variablelist>
  55. -->
  56. <para>To test the results (this takes a long time, around 3 SBUs),
  57. issue:</para>
  58. <screen><userinput remap="test">make check</userinput></screen>
  59. <para>Install the package:</para>
  60. <screen><userinput remap="install">make install
  61. chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
  62. </sect2>
  63. <sect2 id="contents-gettext" role="content">
  64. <title>Contents of Gettext</title>
  65. <segmentedlist>
  66. <segtitle>Installed programs</segtitle>
  67. <segtitle>Installed libraries</segtitle>
  68. <segtitle>Installed directories</segtitle>
  69. <seglistitem>
  70. <seg>autopoint, envsubst, gettext, gettext.sh,
  71. gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
  72. msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
  73. ngettext, recode-sr-latin, and xgettext</seg>
  74. <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
  75. libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg>
  76. <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;,
  77. /usr/share/gettext, and /usr/share/gettext-0.19.8</seg>
  78. </seglistitem>
  79. </segmentedlist>
  80. <variablelist>
  81. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  82. <?dbfo list-presentation="list"?>
  83. <?dbhtml list-presentation="table"?>
  84. <varlistentry id="autopoint">
  85. <term><command>autopoint</command></term>
  86. <listitem>
  87. <para>Copies standard Gettext infrastructure files into a source
  88. package</para>
  89. <indexterm zone="ch-system-gettext autopoint">
  90. <primary sortas="b-autopoint">autopoint</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="msgattrib">
  133. <term><command>msgattrib</command></term>
  134. <listitem>
  135. <para>Filters the messages of a translation catalog according to their
  136. attributes and manipulates the attributes</para>
  137. <indexterm zone="ch-system-gettext msgattrib">
  138. <primary sortas="b-msgattrib">msgattrib</primary>
  139. </indexterm>
  140. </listitem>
  141. </varlistentry>
  142. <varlistentry id="msgcat">
  143. <term><command>msgcat</command></term>
  144. <listitem>
  145. <para>Concatenates and merges the given
  146. <filename class="extension">.po</filename> files</para>
  147. <indexterm zone="ch-system-gettext msgcat">
  148. <primary sortas="b-msgcat">msgcat</primary>
  149. </indexterm>
  150. </listitem>
  151. </varlistentry>
  152. <varlistentry id="msgcmp">
  153. <term><command>msgcmp</command></term>
  154. <listitem>
  155. <para>Compares two <filename class="extension">.po</filename>
  156. files to check that both contain the same set of msgid strings</para>
  157. <indexterm zone="ch-system-gettext msgcmp">
  158. <primary sortas="b-msgcmp">msgcmp</primary>
  159. </indexterm>
  160. </listitem>
  161. </varlistentry>
  162. <varlistentry id="msgcomm">
  163. <term><command>msgcomm</command></term>
  164. <listitem>
  165. <para>Finds the messages that are common to the given
  166. <filename class="extension">.po</filename> files</para>
  167. <indexterm zone="ch-system-gettext msgcomm">
  168. <primary sortas="b-msgcomm">msgcomm</primary>
  169. </indexterm>
  170. </listitem>
  171. </varlistentry>
  172. <varlistentry id="msgconv">
  173. <term><command>msgconv</command></term>
  174. <listitem>
  175. <para>Converts a translation catalog to a different character
  176. encoding</para>
  177. <indexterm zone="ch-system-gettext msgconv">
  178. <primary sortas="b-msgconv">msgconv</primary>
  179. </indexterm>
  180. </listitem>
  181. </varlistentry>
  182. <varlistentry id="msgen">
  183. <term><command>msgen</command></term>
  184. <listitem>
  185. <para>Creates an English translation catalog</para>
  186. <indexterm zone="ch-system-gettext msgen">
  187. <primary sortas="b-msgen">msgen</primary>
  188. </indexterm>
  189. </listitem>
  190. </varlistentry>
  191. <varlistentry id="msgexec">
  192. <term><command>msgexec</command></term>
  193. <listitem>
  194. <para>Applies a command to all translations of a translation
  195. catalog</para>
  196. <indexterm zone="ch-system-gettext msgexec">
  197. <primary sortas="b-msgexec">msgexec</primary>
  198. </indexterm>
  199. </listitem>
  200. </varlistentry>
  201. <varlistentry id="msgfilter">
  202. <term><command>msgfilter</command></term>
  203. <listitem>
  204. <para>Applies a filter to all translations of a translation
  205. catalog</para>
  206. <indexterm zone="ch-system-gettext msgfilter">
  207. <primary sortas="b-msgfilter">msgfilter</primary>
  208. </indexterm>
  209. </listitem>
  210. </varlistentry>
  211. <varlistentry id="msgfmt">
  212. <term><command>msgfmt</command></term>
  213. <listitem>
  214. <para>Generates a binary message catalog from a translation
  215. catalog</para>
  216. <indexterm zone="ch-system-gettext msgfmt">
  217. <primary sortas="b-msgfmt">msgfmt</primary>
  218. </indexterm>
  219. </listitem>
  220. </varlistentry>
  221. <varlistentry id="msggrep">
  222. <term><command>msggrep</command></term>
  223. <listitem>
  224. <para>Extracts all messages of a translation catalog that match a
  225. given pattern or belong to some given source files</para>
  226. <indexterm zone="ch-system-gettext msggrep">
  227. <primary sortas="b-msggrep">msggrep</primary>
  228. </indexterm>
  229. </listitem>
  230. </varlistentry>
  231. <varlistentry id="msginit">
  232. <term><command>msginit</command></term>
  233. <listitem>
  234. <para>Creates a new <filename class="extension">.po</filename> file,
  235. initializing the meta information with values from the user's
  236. environment</para>
  237. <indexterm zone="ch-system-gettext msginit">
  238. <primary sortas="b-msginit">msginit</primary>
  239. </indexterm>
  240. </listitem>
  241. </varlistentry>
  242. <varlistentry id="msgmerge">
  243. <term><command>msgmerge</command></term>
  244. <listitem>
  245. <para>Combines two raw translations into a single file</para>
  246. <indexterm zone="ch-system-gettext msgmerge">
  247. <primary sortas="b-msgmerge">msgmerge</primary>
  248. </indexterm>
  249. </listitem>
  250. </varlistentry>
  251. <varlistentry id="msgunfmt">
  252. <term><command>msgunfmt</command></term>
  253. <listitem>
  254. <para>Decompiles a binary message catalog into raw translation
  255. text</para>
  256. <indexterm zone="ch-system-gettext msgunfmt">
  257. <primary sortas="b-msgunfmt">msgunfmt</primary>
  258. </indexterm>
  259. </listitem>
  260. </varlistentry>
  261. <varlistentry id="msguniq">
  262. <term><command>msguniq</command></term>
  263. <listitem>
  264. <para>Unifies duplicate translations in a translation catalog</para>
  265. <indexterm zone="ch-system-gettext msguniq">
  266. <primary sortas="b-msguniq">msguniq</primary>
  267. </indexterm>
  268. </listitem>
  269. </varlistentry>
  270. <varlistentry id="ngettext">
  271. <term><command>ngettext</command></term>
  272. <listitem>
  273. <para>Displays native language translations of a textual message whose
  274. grammatical form depends on a number</para>
  275. <indexterm zone="ch-system-gettext ngettext">
  276. <primary sortas="b-ngettext">ngettext</primary>
  277. </indexterm>
  278. </listitem>
  279. </varlistentry>
  280. <varlistentry id="recode-sr-latin">
  281. <term><command>recode-sr-latin</command></term>
  282. <listitem>
  283. <para>Recodes Serbian text from Cyrillic to Latin script</para>
  284. <indexterm zone="ch-system-gettext recode-sr-latin">
  285. <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
  286. </indexterm>
  287. </listitem>
  288. </varlistentry>
  289. <varlistentry id="xgettext">
  290. <term><command>xgettext</command></term>
  291. <listitem>
  292. <para>Extracts the translatable message lines from the given source
  293. files to make the first translation template</para>
  294. <indexterm zone="ch-system-gettext xgettext">
  295. <primary sortas="b-xgettext">xgettext</primary>
  296. </indexterm>
  297. </listitem>
  298. </varlistentry>
  299. <varlistentry id="libasprintf">
  300. <term><filename class="libraryfile">libasprintf</filename></term>
  301. <listitem>
  302. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  303. C formatted output routines usable in C++ programs, for use with the
  304. <emphasis>&lt;string&gt;</emphasis> strings and the
  305. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  306. <indexterm zone="ch-system-gettext libasprintf">
  307. <primary sortas="c-libasprintf">libasprintf</primary>
  308. </indexterm>
  309. </listitem>
  310. </varlistentry>
  311. <varlistentry id="libgettextlib">
  312. <term><filename class="libraryfile">libgettextlib</filename></term>
  313. <listitem>
  314. <para>a private library containing common routines used by the
  315. various Gettext programs; these are not intended for general use</para>
  316. <indexterm zone="ch-system-gettext libgettextlib">
  317. <primary sortas="c-libgettextlib">libgettextlib</primary>
  318. </indexterm>
  319. </listitem>
  320. </varlistentry>
  321. <varlistentry id="libgettextpo">
  322. <term><filename class="libraryfile">libgettextpo</filename></term>
  323. <listitem>
  324. <para>Used to write specialized programs that process
  325. <filename class="extension">.po</filename> files; this library is
  326. used when the standard applications shipped with Gettext (such as
  327. <command>msgcomm</command>, <command>msgcmp</command>,
  328. <command>msgattrib</command>, and <command>msgen</command>) will
  329. not suffice</para>
  330. <indexterm zone="ch-system-gettext libgettextpo">
  331. <primary sortas="c-libgettextpo">libgettextpo</primary>
  332. </indexterm>
  333. </listitem>
  334. </varlistentry>
  335. <varlistentry id="libgettextsrc">
  336. <term><filename class="libraryfile">libgettextsrc</filename></term>
  337. <listitem>
  338. <para>A private library containing common routines used by the
  339. various Gettext programs; these are not intended for general use</para>
  340. <indexterm zone="ch-system-gettext libgettextsrc">
  341. <primary sortas="c-libgettextsrc">libgettextsrc</primary>
  342. </indexterm>
  343. </listitem>
  344. </varlistentry>
  345. <varlistentry id="libtextstyle">
  346. <term><filename class="libraryfile">libtextstyle</filename></term>
  347. <listitem>
  348. <para>Text styling library</para>
  349. <indexterm zone="ch-system-gettext libtextstyle">
  350. <primary sortas="c-libtextstyle">libtextstyle</primary>
  351. </indexterm>
  352. </listitem>
  353. </varlistentry>
  354. <varlistentry id="preloadable_libintl">
  355. <term><filename class="libraryfile">preloadable_libintl</filename></term>
  356. <listitem>
  357. <para>A library, intended to be used by LD_PRELOAD that assists
  358. <filename class="libraryfile">libintl</filename> in logging
  359. untranslated messages</para>
  360. <indexterm zone="ch-system-gettext preloadable_libintl">
  361. <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
  362. </indexterm>
  363. </listitem>
  364. </varlistentry>
  365. </variablelist>
  366. </sect2>
  367. </sect1>