gettext.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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 (Native Language
  13. Support), enabling them to output messages in the user's native language.</para>
  14. <segmentedlist>
  15. <segtitle>&buildtime;</segtitle>
  16. <segtitle>&diskspace;</segtitle>
  17. <seglistitem><seg>1.2 SBU</seg><seg>65.1 MB</seg></seglistitem>
  18. </segmentedlist>
  19. <segmentedlist>
  20. <segtitle>&dependencies;</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.so, libgettextpo.[a,so], and libgettextsrc.so</seg></seglistitem>
  46. </segmentedlist>
  47. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  48. <?dbfo list-presentation="list"?>
  49. <?dbhtml list-presentation="table"?>
  50. <varlistentry id="autopoint">
  51. <term><command>autopoint</command></term>
  52. <listitem>
  53. <para>Copies standard Gettext infrastructure files into a source package</para>
  54. <indexterm zone="ch-system-gettext autopoint"><primary sortas="b-autopoint">autopoint</primary></indexterm>
  55. </listitem>
  56. </varlistentry>
  57. <varlistentry id="config.charset">
  58. <term><command>config.charset</command></term>
  59. <listitem>
  60. <para>Outputs a system-dependent table of character encoding aliases</para>
  61. <indexterm zone="ch-system-gettext config.charset"><primary sortas="b-config.charset">config.charset</primary></indexterm>
  62. </listitem>
  63. </varlistentry>
  64. <varlistentry id="config.rpath">
  65. <term><command>config.rpath</command></term>
  66. <listitem>
  67. <para>Outputs a system-dependent set of variables, describing how to set the
  68. runtime search path of shared libraries in an executable</para>
  69. <indexterm zone="ch-system-gettext config.rpath"><primary sortas="b-config.rpath">config.rpath</primary></indexterm>
  70. </listitem>
  71. </varlistentry>
  72. <varlistentry id="envsubst">
  73. <term><command>envsubst</command></term>
  74. <listitem>
  75. <para>Substitutes environment variables in shell format strings</para>
  76. <indexterm zone="ch-system-gettext envsubst"><primary sortas="b-envsubst">envsubst</primary></indexterm>
  77. </listitem>
  78. </varlistentry>
  79. <varlistentry id="gettext">
  80. <term><command>gettext</command></term>
  81. <listitem>
  82. <para>Translates a natural language message into the user's language
  83. by looking up the translation in a message catalog</para>
  84. <indexterm zone="ch-system-gettext gettext"><primary sortas="b-gettext">gettext</primary></indexterm>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry id="gettextize">
  88. <term><command>gettextize</command></term>
  89. <listitem>
  90. <para>Copies all standard Gettext files into the given top-level
  91. directory of a package to begin internationalizing it</para>
  92. <indexterm zone="ch-system-gettext gettextize"><primary sortas="b-gettextize">gettextize</primary></indexterm>
  93. </listitem>
  94. </varlistentry>
  95. <varlistentry id="hostname-gettext">
  96. <term><command>hostname</command></term>
  97. <listitem>
  98. <para>Displays a network hostname in various forms</para>
  99. <indexterm zone="ch-system-gettext hostname-gettext"><primary sortas="b-hostname-gettext">hostname</primary></indexterm>
  100. </listitem>
  101. </varlistentry>
  102. <varlistentry id="msgattrib">
  103. <term><command>msgattrib</command></term>
  104. <listitem>
  105. <para>Filters the messages of a translation catalog according to their
  106. attributes and manipulates the attributes</para>
  107. <indexterm zone="ch-system-gettext msgattrib"><primary sortas="b-msgattrib">msgattrib</primary></indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="msgcat">
  111. <term><command>msgcat</command></term>
  112. <listitem>
  113. <para>Concatenates and merges the given <filename class="extension">.po</filename> files</para>
  114. <indexterm zone="ch-system-gettext msgcat"><primary sortas="b-msgcat">msgcat</primary></indexterm>
  115. </listitem>
  116. </varlistentry>
  117. <varlistentry id="msgcmp">
  118. <term><command>msgcmp</command></term>
  119. <listitem>
  120. <para>Compares two <filename class="extension">.po</filename>
  121. files to check that both contain the same set of msgid strings</para>
  122. <indexterm zone="ch-system-gettext msgcmp"><primary sortas="b-msgcmp">msgcmp</primary></indexterm>
  123. </listitem>
  124. </varlistentry>
  125. <varlistentry id="msgcomm">
  126. <term><command>msgcomm</command></term>
  127. <listitem>
  128. <para>Finds the messages that are common to
  129. to the given <filename class="extension">.po</filename> files</para>
  130. <indexterm zone="ch-system-gettext msgcomm"><primary sortas="b-msgcomm">msgcomm</primary></indexterm>
  131. </listitem>
  132. </varlistentry>
  133. <varlistentry id="msgconv">
  134. <term><command>msgconv</command></term>
  135. <listitem>
  136. <para>Converts a translation catalog to a different character encoding</para>
  137. <indexterm zone="ch-system-gettext msgconv"><primary sortas="b-msgconv">msgconv</primary></indexterm>
  138. </listitem>
  139. </varlistentry>
  140. <varlistentry id="msgen">
  141. <term><command>msgen</command></term>
  142. <listitem>
  143. <para>Creates an English translation catalog</para>
  144. <indexterm zone="ch-system-gettext msgen"><primary sortas="b-msgen">msgen</primary></indexterm>
  145. </listitem>
  146. </varlistentry>
  147. <varlistentry id="msgexec">
  148. <term><command>msgexec</command></term>
  149. <listitem>
  150. <para>Applies a command to all translations of a translation catalog</para>
  151. <indexterm zone="ch-system-gettext msgexec"><primary sortas="b-msgexec">msgexec</primary></indexterm>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry id="msgfilter">
  155. <term><command>msgfilter</command></term>
  156. <listitem>
  157. <para>Applies a filter to all translations of a translation catalog</para>
  158. <indexterm zone="ch-system-gettext msgfilter"><primary sortas="b-msgfilter">msgfilter</primary></indexterm>
  159. </listitem>
  160. </varlistentry>
  161. <varlistentry id="msgfmt">
  162. <term><command>msgfmt</command></term>
  163. <listitem>
  164. <para>Generates a binary message catalog from a translation catalog</para>
  165. <indexterm zone="ch-system-gettext msgfmt"><primary sortas="b-msgfmt">msgfmt</primary></indexterm>
  166. </listitem>
  167. </varlistentry>
  168. <varlistentry id="msggrep">
  169. <term><command>msggrep</command></term>
  170. <listitem>
  171. <para>Extracts all messages of a translation catalog that match a
  172. given pattern or belong to some given source files</para>
  173. <indexterm zone="ch-system-gettext msggrep"><primary sortas="b-msggrep">msggrep</primary></indexterm>
  174. </listitem>
  175. </varlistentry>
  176. <varlistentry id="msginit">
  177. <term><command>msginit</command></term>
  178. <listitem>
  179. <para>Creates a new <filename class="extension">.po</filename> file, initializing the meta
  180. information with values from the user's environment</para>
  181. <indexterm zone="ch-system-gettext msginit"><primary sortas="b-msginit">msginit</primary></indexterm>
  182. </listitem>
  183. </varlistentry>
  184. <varlistentry id="msgmerge">
  185. <term><command>msgmerge</command></term>
  186. <listitem>
  187. <para>Combines two raw translations into a single file</para>
  188. <indexterm zone="ch-system-gettext msgmerge"><primary sortas="b-msgmerge">msgmerge</primary></indexterm>
  189. </listitem>
  190. </varlistentry>
  191. <varlistentry id="msgunfmt">
  192. <term><command>msgunfmt</command></term>
  193. <listitem>
  194. <para>Decompiles a binary message catalog into raw translation text</para>
  195. <indexterm zone="ch-system-gettext msgunfmt"><primary sortas="b-msgunfmt">msgunfmt</primary></indexterm>
  196. </listitem>
  197. </varlistentry>
  198. <varlistentry id="msguniq">
  199. <term><command>msguniq</command></term>
  200. <listitem>
  201. <para>Unifies duplicate translations in a translation catalog</para>
  202. <indexterm zone="ch-system-gettext msguniq"><primary sortas="b-msguniq">msguniq</primary></indexterm>
  203. </listitem>
  204. </varlistentry>
  205. <varlistentry id="ngettext">
  206. <term><command>ngettext</command></term>
  207. <listitem>
  208. <para>Displays native language translations of a textual message whose
  209. grammatical form depends on a number</para>
  210. <indexterm zone="ch-system-gettext ngettext"><primary sortas="b-ngettext">ngettext</primary></indexterm>
  211. </listitem>
  212. </varlistentry>
  213. <varlistentry id="xgettext">
  214. <term><command>xgettext</command></term>
  215. <listitem>
  216. <para>Extracts the translatable message lines from the given source
  217. files to make the first translation template</para>
  218. <indexterm zone="ch-system-gettext xgettext"><primary sortas="b-xgettext">xgettext</primary></indexterm>
  219. </listitem>
  220. </varlistentry>
  221. <varlistentry id="libasprintf">
  222. <term><filename class="libraryfile">libasprintf</filename></term>
  223. <listitem>
  224. <para>defines the <emphasis>autosprintf</emphasis> class, which makes
  225. C formatted output routines usable in C++ programs, for use with the
  226. <emphasis>&lt;string&gt;</emphasis> strings and the
  227. <emphasis>&lt;iostream&gt;</emphasis> streams</para>
  228. <indexterm zone="ch-system-gettext libasprintf"><primary sortas="c-libasprintf">libasprintf</primary></indexterm>
  229. </listitem>
  230. </varlistentry>
  231. <varlistentry id="libgettextlib">
  232. <term><filename class="libraryfile">libgettextlib</filename></term>
  233. <listitem>
  234. <para>a private library containing common routines used by the various Gettext
  235. programs; these are not intended for general use</para>
  236. <indexterm zone="ch-system-gettext libgettextlib"><primary sortas="c-libgettextlib">libgettextlib</primary></indexterm>
  237. </listitem>
  238. </varlistentry>
  239. <varlistentry id="libgettextpo">
  240. <term><filename class="libraryfile">libgettextpo</filename></term>
  241. <listitem>
  242. <para>Used to write specialized programs that process <filename
  243. class="extension">.po</filename> files; this library is used when the
  244. standard applications shipped with Gettext (such as
  245. <command>msgcomm</command>, <command>msgcmp</command>,
  246. <command>msgattrib</command>, and <command>msgen</command>) will not
  247. suffice</para>
  248. <indexterm zone="ch-system-gettext libgettextpo"><primary sortas="c-libgettextpo">libgettextpo</primary></indexterm>
  249. </listitem>
  250. </varlistentry>
  251. <varlistentry id="libgettextsrc">
  252. <term><filename class="libraryfile">libgettextsrc</filename></term>
  253. <listitem>
  254. <para>A private library containing common routines used by the various Gettext
  255. programs; these are not intended for general use</para>
  256. <indexterm zone="ch-system-gettext libgettextsrc"><primary sortas="c-libgettextsrc">libgettextsrc</primary></indexterm>
  257. </listitem>
  258. </varlistentry>
  259. </variablelist>
  260. </sect2>
  261. </sect1>