gettext.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-system-gettext" xreflabel="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 Native Language Support
  13. (NLS), 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>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, 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>Now 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, project-id, team-address, trigger, urlget, user-email and xgettext</seg>
  45. <seg>libasprintf[a,so], libgettextlib[a,so], libgettextpo[a,so] and libgettextsrc[a,so]</seg></seglistitem>
  46. </segmentedlist>
  47. <variablelist><title>Short descriptions</title>
  48. <varlistentry id="autopoint">
  49. <term><command>autopoint</command></term>
  50. <listitem>
  51. <indexterm zone="ch-system-gettext autopoint"><primary sortas="b-autopoint">autopoint</primary></indexterm>
  52. <para>copies standard Gettext infrastructure files into a source package.</para>
  53. </listitem>
  54. </varlistentry>
  55. <varlistentry id="config.charset">
  56. <term><command>config.charset</command></term>
  57. <listitem>
  58. <indexterm zone="ch-system-gettext config.charset"><primary sortas="b-config.charset">config.charset</primary></indexterm>
  59. <para>outputs a system-dependent table of character encoding aliases.</para>
  60. </listitem>
  61. </varlistentry>
  62. <varlistentry id="config.rpath">
  63. <term><command>config.rpath</command></term>
  64. <listitem>
  65. <indexterm zone="ch-system-gettext config.rpath"><primary sortas="b-config.rpath">config.rpath</primary></indexterm>
  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. </listitem>
  69. </varlistentry>
  70. <varlistentry id="envsubst">
  71. <term><command>envsubst</command></term>
  72. <listitem>
  73. <indexterm zone="ch-system-gettext envsubst"><primary sortas="b-envsubst">envsubst</primary></indexterm>
  74. <para>substitutes environment variables in shell format strings.</para>
  75. </listitem>
  76. </varlistentry>
  77. <varlistentry id="gettext">
  78. <term><command>gettext</command></term>
  79. <listitem>
  80. <indexterm zone="ch-system-gettext gettext"><primary sortas="b-gettext">gettext</primary></indexterm>
  81. <para>translates a natural language message into
  82. the user's language, by looking up the translation in a message catalog.</para>
  83. </listitem>
  84. </varlistentry>
  85. <varlistentry id="gettextize">
  86. <term><command>gettextize</command></term>
  87. <listitem>
  88. <indexterm zone="ch-system-gettext gettextize"><primary sortas="b-gettextize">gettextize</primary></indexterm>
  89. <para>copies all standard Gettext files into
  90. the given top-level directory of a package, to begin inter-nationalizing it.</para>
  91. </listitem>
  92. </varlistentry>
  93. <varlistentry id="hostname-gettext">
  94. <term><command>hostname</command></term>
  95. <listitem>
  96. <indexterm zone="ch-system-gettext hostname-gettext"><primary sortas="b-hostname-gettext">hostname</primary></indexterm>
  97. <para>displays a network hostname in various forms.</para>
  98. </listitem>
  99. </varlistentry>
  100. <varlistentry id="msgattrib">
  101. <term><command>msgattrib</command></term>
  102. <listitem>
  103. <indexterm zone="ch-system-gettext msgattrib"><primary sortas="b-msgattrib">msgattrib</primary></indexterm>
  104. <para>filters the messages of a translation
  105. catalog according to their attributes and manipulates the attributes.</para>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry id="msgcat">
  109. <term><command>msgcat</command></term>
  110. <listitem>
  111. <indexterm zone="ch-system-gettext msgcat"><primary sortas="b-msgcat">msgcat</primary></indexterm>
  112. <para>concatenates and merges the given <filename class="extension">.po</filename> files.</para>
  113. </listitem>
  114. </varlistentry>
  115. <varlistentry id="msgcmp">
  116. <term><command>msgcmp</command></term>
  117. <listitem>
  118. <indexterm zone="ch-system-gettext msgcmp"><primary sortas="b-msgcmp">msgcmp</primary></indexterm>
  119. <para>compares two <filename class="extension">.po</filename>
  120. files to check that both contain the same set of msgid strings.</para>
  121. </listitem>
  122. </varlistentry>
  123. <varlistentry id="msgcomm">
  124. <term><command>msgcomm</command></term>
  125. <listitem>
  126. <indexterm zone="ch-system-gettext msgcomm"><primary sortas="b-msgcomm">msgcomm</primary></indexterm>
  127. <para>finds the messages that are common to
  128. to the given <filename class="extension">.po</filename> files.</para>
  129. </listitem>
  130. </varlistentry>
  131. <varlistentry id="msgconv">
  132. <term><command>msgconv</command></term>
  133. <listitem>
  134. <indexterm zone="ch-system-gettext msgconv"><primary sortas="b-msgconv">msgconv</primary></indexterm>
  135. <para>converts a translation catalog to a different character encoding.</para>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry id="msgen">
  139. <term><command>msgen</command></term>
  140. <listitem>
  141. <indexterm zone="ch-system-gettext msgen"><primary sortas="b-msgen">msgen</primary></indexterm>
  142. <para>creates an English translation catalog.</para>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry id="msgexec">
  146. <term><command>msgexec</command></term>
  147. <listitem>
  148. <indexterm zone="ch-system-gettext msgexec"><primary sortas="b-msgexec">msgexec</primary></indexterm>
  149. <para>applies a command to all translations of a translation catalog.</para>
  150. </listitem>
  151. </varlistentry>
  152. <varlistentry id="msgfilter">
  153. <term><command>msgfilter</command></term>
  154. <listitem>
  155. <indexterm zone="ch-system-gettext msgfilter"><primary sortas="b-msgfilter">msgfilter</primary></indexterm>
  156. <para>applies a filter to all translations of a translation catalog.</para>
  157. </listitem>
  158. </varlistentry>
  159. <varlistentry id="msgfmt">
  160. <term><command>msgfmt</command></term>
  161. <listitem>
  162. <indexterm zone="ch-system-gettext msgfmt"><primary sortas="b-msgfmt">msgfmt</primary></indexterm>
  163. <para>generates a binary message catalog from from a translation catalog.</para>
  164. </listitem>
  165. </varlistentry>
  166. <varlistentry id="msggrep">
  167. <term><command>msggrep</command></term>
  168. <listitem>
  169. <indexterm zone="ch-system-gettext msggrep"><primary sortas="b-msggrep">msggrep</primary></indexterm>
  170. <para>extracts all messages of a translation
  171. catalog that match a given pattern or belong to some given source files.</para>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry id="msginit">
  175. <term><command>msginit</command></term>
  176. <listitem>
  177. <indexterm zone="ch-system-gettext msginit"><primary sortas="b-msginit">msginit</primary></indexterm>
  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. </listitem>
  181. </varlistentry>
  182. <varlistentry id="msgmerge">
  183. <term><command>msgmerge</command></term>
  184. <listitem>
  185. <indexterm zone="ch-system-gettext msgmerge"><primary sortas="b-msgmerge">msgmerge</primary></indexterm>
  186. <para>combines two raw translations into a single file.</para>
  187. </listitem>
  188. </varlistentry>
  189. <varlistentry id="msgunfmt">
  190. <term><command>msgunfmt</command></term>
  191. <listitem>
  192. <indexterm zone="ch-system-gettext msgunfmt"><primary sortas="b-msgunfmt">msgunfmt</primary></indexterm>
  193. <para>decompiles a binary message catalog into raw translation text.</para>
  194. </listitem>
  195. </varlistentry>
  196. <varlistentry id="msguniq">
  197. <term><command>msguniq</command></term>
  198. <listitem>
  199. <indexterm zone="ch-system-gettext msguniq"><primary sortas="b-msguniq">msguniq</primary></indexterm>
  200. <para>unifies duplicate translations in a translation catalog.</para>
  201. </listitem>
  202. </varlistentry>
  203. <varlistentry id="ngettext">
  204. <term><command>ngettext</command></term>
  205. <listitem>
  206. <indexterm zone="ch-system-gettext ngettext"><primary sortas="b-ngettext">ngettext</primary></indexterm>
  207. <para>displays native language translations of a
  208. textual message whose grammatical form depends on a number.</para>
  209. </listitem>
  210. </varlistentry>
  211. <varlistentry id="xgettext">
  212. <term><command>xgettext</command></term>
  213. <listitem>
  214. <indexterm zone="ch-system-gettext xgettext"><primary sortas="b-xgettext">xgettext</primary></indexterm>
  215. <para>extracts the translatable message lines
  216. from the given source files, to make the first translation template.</para>
  217. </listitem>
  218. </varlistentry>
  219. <varlistentry id="libasprintf">
  220. <term><filename class="libraryfile">libasprintf</filename></term>
  221. <listitem>
  222. <indexterm zone="ch-system-gettext libasprintf"><primary sortas="c-libasprintf">libasprintf</primary></indexterm>
  223. <para>defines the autosprintf class, which
  224. makes C formatted output routines usable in C++ programs, for use with the
  225. &lt;string&gt; strings and the &lt;iostream&gt; streams.</para>
  226. </listitem>
  227. </varlistentry>
  228. <varlistentry id="libgettextlib">
  229. <term><filename class="libraryfile">libgettextlib</filename></term>
  230. <listitem>
  231. <indexterm zone="ch-system-gettext libgettextlib"><primary sortas="c-libgettextlib">libgettextlib</primary></indexterm>
  232. <para>is a private library containing common routines used by the various Gettext
  233. programs. They're not meant for general use.</para>
  234. </listitem>
  235. </varlistentry>
  236. <varlistentry id="libgettextpo">
  237. <term><filename class="libraryfile">libgettextpo</filename></term>
  238. <listitem>
  239. <indexterm zone="ch-system-gettext libgettextpo"><primary sortas="c-libgettextpo">libgettextpo</primary></indexterm>
  240. <para>is used to write specialized programs that process <filename
  241. class="extension">.po</filename> files. This library is
  242. used when the standard applications shipped with Gettext won't suffice (such as
  243. <command>msgcomm</command>, <command>msgcmp</command>,
  244. <command>msgattrib</command> and <command>msgen</command>).</para>
  245. </listitem>
  246. </varlistentry>
  247. <varlistentry id="libgettextsrc">
  248. <term><filename class="libraryfile">libgettextsrc</filename></term>
  249. <listitem>
  250. <indexterm zone="ch-system-gettext libgettextsrc"><primary sortas="c-libgettextsrc">libgettextsrc</primary></indexterm>
  251. <para>is a private library containing common routines used by the various Gettext
  252. programs. They're not meant for general use.</para>
  253. </listitem>
  254. </varlistentry>
  255. </variablelist>
  256. </sect2>
  257. </sect1>