gettext.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-gettext" role="wrap">
  7. <title>Gettext-&gettext-version;</title>
  8. <?dbhtml filename="gettext.html"?>
  9. <indexterm zone="ch-system-gettext"><primary sortas="a-Gettext">Gettext</primary></indexterm>
  10. <sect2 role="package"><title/>
  11. <para>The Gettext package contains utilities for internationalization and
  12. localization. These allow programs to be compiled with NLS, enabling them
  13. to output messages in the user's native language.</para>
  14. <segmentedlist>
  15. <segtitle>&buildtime;</segtitle>
  16. <segtitle>&diskspace;</segtitle>
  17. <seglistitem><seg>0.5 SBU</seg><seg>55 MB</seg></seglistitem>
  18. </segmentedlist>
  19. <segmentedlist>
  20. <segtitle>Gettext installation depends on</segtitle>
  21. <seglistitem><seg>Bash, Binutils, Bison, Coreutils,
  22. Diffutils, Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
  23. </segmentedlist>
  24. </sect2>
  25. <sect2 role="installation">
  26. <title>Installation of Gettext</title>
  27. <para>Prepare Gettext for compilation:</para>
  28. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  29. <para>Compile the package:</para>
  30. <screen><userinput>make</userinput></screen>
  31. <para>To test the results, issue:
  32. <userinput>make check</userinput>. This takes a very long time, around
  33. 7 SBUs.</para>
  34. <para>Install the package:</para>
  35. <screen><userinput>make install</userinput></screen>
  36. </sect2>
  37. <sect2 id="contents-gettext" role="content"><title>Contents of Gettext</title>
  38. <segmentedlist>
  39. <segtitle>Installed programs</segtitle>
  40. <segtitle>Installed libraries</segtitle>
  41. <seglistitem><seg>autopoint, config.charset, config.rpath, envsubst, gettext,
  42. gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
  43. msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
  44. ngettext, and xgettext</seg>
  45. <seg>libasprintf[a,so], libgettextlib[a,so], libgettextpo[a,so] and libgettextsrc[a,so]</seg></seglistitem>
  46. </segmentedlist>
  47. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  48. <?dbfo list-presentation="list"?>
  49. <varlistentry id="autopoint">
  50. <term><command>autopoint</command></term>
  51. <listitem>
  52. <para>Copies standard Gettext infrastructure files into a source package</para>
  53. <indexterm zone="ch-system-gettext autopoint"><primary sortas="b-autopoint">autopoint</primary></indexterm>
  54. </listitem>
  55. </varlistentry>
  56. <varlistentry id="config.charset">
  57. <term><command>config.charset</command></term>
  58. <listitem>
  59. <para>Outputs a system-dependent table of character encoding aliases</para>
  60. <indexterm zone="ch-system-gettext config.charset"><primary sortas="b-config.charset">config.charset</primary></indexterm>
  61. </listitem>
  62. </varlistentry>
  63. <varlistentry id="config.rpath">
  64. <term><command>config.rpath</command></term>
  65. <listitem>
  66. <para>Outputs a system-dependent set of variables, describing how to set the
  67. runtime search path of shared libraries in an executable</para>
  68. <indexterm zone="ch-system-gettext config.rpath"><primary sortas="b-config.rpath">config.rpath</primary></indexterm>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry id="envsubst">
  72. <term><command>envsubst</command></term>
  73. <listitem>
  74. <para>Substitutes environment variables in shell format strings</para>
  75. <indexterm zone="ch-system-gettext envsubst"><primary sortas="b-envsubst">envsubst</primary></indexterm>
  76. </listitem>
  77. </varlistentry>
  78. <varlistentry id="gettext">
  79. <term><command>gettext</command></term>
  80. <listitem>
  81. <para>Translates a natural language message into the user's language
  82. by looking up the translation in a message catalog</para>
  83. <indexterm zone="ch-system-gettext gettext"><primary sortas="b-gettext">gettext</primary></indexterm>
  84. </listitem>
  85. </varlistentry>
  86. <varlistentry id="gettextize">
  87. <term><command>gettextize</command></term>
  88. <listitem>
  89. <para>Copies all standard Gettext files into the given top-level
  90. directory of a package to begin internationalizing it</para>
  91. <indexterm zone="ch-system-gettext gettextize"><primary sortas="b-gettextize">gettextize</primary></indexterm>
  92. </listitem>
  93. </varlistentry>
  94. <varlistentry id="hostname-gettext">
  95. <term><command>hostname</command></term>
  96. <listitem>
  97. <para>Displays a network hostname in various forms</para>
  98. <indexterm zone="ch-system-gettext hostname-gettext"><primary sortas="b-hostname-gettext">hostname</primary></indexterm>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry id="msgattrib">
  102. <term><command>msgattrib</command></term>
  103. <listitem>
  104. <para>Filters the messages of a translation catalog according to their
  105. attributes and manipulates the attributes</para>
  106. <indexterm zone="ch-system-gettext msgattrib"><primary sortas="b-msgattrib">msgattrib</primary></indexterm>
  107. </listitem>
  108. </varlistentry>
  109. <varlistentry id="msgcat">
  110. <term><command>msgcat</command></term>
  111. <listitem>
  112. <para>Concatenates and merges the given <filename class="extension">.po</filename> files</para>
  113. <indexterm zone="ch-system-gettext msgcat"><primary sortas="b-msgcat">msgcat</primary></indexterm>
  114. </listitem>
  115. </varlistentry>
  116. <varlistentry id="msgcmp">
  117. <term><command>msgcmp</command></term>
  118. <listitem>
  119. <para>Compares two <filename class="extension">.po</filename>
  120. files to check that both contain the same set of msgid strings</para>
  121. <indexterm zone="ch-system-gettext msgcmp"><primary sortas="b-msgcmp">msgcmp</primary></indexterm>
  122. </listitem>
  123. </varlistentry>
  124. <varlistentry id="msgcomm">
  125. <term><command>msgcomm</command></term>
  126. <listitem>
  127. <para>Finds the messages that are common to
  128. to the given <filename class="extension">.po</filename> files</para>
  129. <indexterm zone="ch-system-gettext msgcomm"><primary sortas="b-msgcomm">msgcomm</primary></indexterm>
  130. </listitem>
  131. </varlistentry>
  132. <varlistentry id="msgconv">
  133. <term><command>msgconv</command></term>
  134. <listitem>
  135. <para>Converts a translation catalog to a different character encoding</para>
  136. <indexterm zone="ch-system-gettext msgconv"><primary sortas="b-msgconv">msgconv</primary></indexterm>
  137. </listitem>
  138. </varlistentry>
  139. <varlistentry id="msgen">
  140. <term><command>msgen</command></term>
  141. <listitem>
  142. <para>Creates an English translation catalog</para>
  143. <indexterm zone="ch-system-gettext msgen"><primary sortas="b-msgen">msgen</primary></indexterm>
  144. </listitem>
  145. </varlistentry>
  146. <varlistentry id="msgexec">
  147. <term><command>msgexec</command></term>
  148. <listitem>
  149. <para>Applies a command to all translations of a translation catalog</para>
  150. <indexterm zone="ch-system-gettext msgexec"><primary sortas="b-msgexec">msgexec</primary></indexterm>
  151. </listitem>
  152. </varlistentry>
  153. <varlistentry id="msgfilter">
  154. <term><command>msgfilter</command></term>
  155. <listitem>
  156. <para>Applies a filter to all translations of a translation catalog</para>
  157. <indexterm zone="ch-system-gettext msgfilter"><primary sortas="b-msgfilter">msgfilter</primary></indexterm>
  158. </listitem>
  159. </varlistentry>
  160. <varlistentry id="msgfmt">
  161. <term><command>msgfmt</command></term>
  162. <listitem>
  163. <para>Generates a binary message catalog from from a translation catalog</para>
  164. <indexterm zone="ch-system-gettext msgfmt"><primary sortas="b-msgfmt">msgfmt</primary></indexterm>
  165. </listitem>
  166. </varlistentry>
  167. <varlistentry id="msggrep">
  168. <term><command>msggrep</command></term>
  169. <listitem>
  170. <para>Extracts all messages of a translation catalog that match a
  171. given pattern or belong to some given source files</para>
  172. <indexterm zone="ch-system-gettext msggrep"><primary sortas="b-msggrep">msggrep</primary></indexterm>
  173. </listitem>
  174. </varlistentry>
  175. <varlistentry id="msginit">
  176. <term><command>msginit</command></term>
  177. <listitem>
  178. <para>Creates a new <filename class="extension">.po</filename> file, initializing the meta
  179. information with values from the user's environment</para>
  180. <indexterm zone="ch-system-gettext msginit"><primary sortas="b-msginit">msginit</primary></indexterm>
  181. </listitem>
  182. </varlistentry>
  183. <varlistentry id="msgmerge">
  184. <term><command>msgmerge</command></term>
  185. <listitem>
  186. <para>Combines two raw translations into a single file</para>
  187. <indexterm zone="ch-system-gettext msgmerge"><primary sortas="b-msgmerge">msgmerge</primary></indexterm>
  188. </listitem>
  189. </varlistentry>
  190. <varlistentry id="msgunfmt">
  191. <term><command>msgunfmt</command></term>
  192. <listitem>
  193. <para>Decompiles a binary message catalog into raw translation text</para>
  194. <indexterm zone="ch-system-gettext msgunfmt"><primary sortas="b-msgunfmt">msgunfmt</primary></indexterm>
  195. </listitem>
  196. </varlistentry>
  197. <varlistentry id="msguniq">
  198. <term><command>msguniq</command></term>
  199. <listitem>
  200. <para>Unifies duplicate translations in a translation catalog</para>
  201. <indexterm zone="ch-system-gettext msguniq"><primary sortas="b-msguniq">msguniq</primary></indexterm>
  202. </listitem>
  203. </varlistentry>
  204. <varlistentry id="ngettext">
  205. <term><command>ngettext</command></term>
  206. <listitem>
  207. <para>Displays native language translations of a textual message whose
  208. grammatical form depends on a number</para>
  209. <indexterm zone="ch-system-gettext ngettext"><primary sortas="b-ngettext">ngettext</primary></indexterm>
  210. </listitem>
  211. </varlistentry>
  212. <varlistentry id="xgettext">
  213. <term><command>xgettext</command></term>
  214. <listitem>
  215. <para>Extracts the translatable message lines from the given source
  216. files to make the first translation template</para>
  217. <indexterm zone="ch-system-gettext xgettext"><primary sortas="b-xgettext">xgettext</primary></indexterm>
  218. </listitem>
  219. </varlistentry>
  220. <varlistentry id="libasprintf">
  221. <term><filename class="libraryfile">libasprintf</filename></term>
  222. <listitem>
  223. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  224. C formatted output routines usable in C++ programs, for use with the
  225. <emphasis>&lt;string&gt;</emphasis> strings and the
  226. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  227. <indexterm zone="ch-system-gettext libasprintf"><primary sortas="c-libasprintf">libasprintf</primary></indexterm>
  228. </listitem>
  229. </varlistentry>
  230. <varlistentry id="libgettextlib">
  231. <term><filename class="libraryfile">libgettextlib</filename></term>
  232. <listitem>
  233. <para>a private library containing common routines used by the various Gettext
  234. programs; these are not intended for general use</para>
  235. <indexterm zone="ch-system-gettext libgettextlib"><primary sortas="c-libgettextlib">libgettextlib</primary></indexterm>
  236. </listitem>
  237. </varlistentry>
  238. <varlistentry id="libgettextpo">
  239. <term><filename class="libraryfile">libgettextpo</filename></term>
  240. <listitem>
  241. <para>Used to write specialized programs that process <filename
  242. class="extension">.po</filename> files; this library is used when the
  243. standard applications shipped with Gettext (such as
  244. <command>msgcomm</command>, <command>msgcmp</command>,
  245. <command>msgattrib</command>, and <command>msgen</command>) will not
  246. suffice</para>
  247. <indexterm zone="ch-system-gettext libgettextpo"><primary sortas="c-libgettextpo">libgettextpo</primary></indexterm>
  248. </listitem>
  249. </varlistentry>
  250. <varlistentry id="libgettextsrc">
  251. <term><filename class="libraryfile">libgettextsrc</filename></term>
  252. <listitem>
  253. <para>A private library containing common routines used by the various Gettext
  254. programs; these are not intended for general use</para>
  255. <indexterm zone="ch-system-gettext libgettextsrc"><primary sortas="c-libgettextsrc">libgettextsrc</primary></indexterm>
  256. </listitem>
  257. </varlistentry>
  258. </variablelist>
  259. </sect2>
  260. </sect1>