transmision: upgrade 2.22 -> 2.31
[tomato.git] / release / src / router / gettext / gettext-tools / doc / gettext_9.html
blob88644ee9e590290280d1109b934d032054ce687b
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.52a
4 from gettext.texi on 23 May 2005 -->
6 <TITLE>GNU gettext utilities - 9 The User's View</TITLE>
7 </HEAD>
8 <BODY>
9 Go to the <A HREF="gettext_1.html">first</A>, <A HREF="gettext_8.html">previous</A>, <A HREF="gettext_10.html">next</A>, <A HREF="gettext_22.html">last</A> section, <A HREF="gettext_toc.html">table of contents</A>.
10 <P><HR><P>
13 <H1><A NAME="SEC156" HREF="gettext_toc.html#TOC156">9 The User's View</A></H1>
15 <P>
16 When GNU <CODE>gettext</CODE> will truly have reached its goal, average users
17 should feel some kind of astonished pleasure, seeing the effect of
18 that strange kind of magic that just makes their own native language
19 appear everywhere on their screens. As for naive users, they would
20 ideally have no special pleasure about it, merely taking their own
21 language for <EM>granted</EM>, and becoming rather unhappy otherwise.
23 </P>
24 <P>
25 So, let's try to describe here how we would like the magic to operate,
26 as we want the users' view to be the simplest, among all ways one
27 could look at GNU <CODE>gettext</CODE>. All other software engineers:
28 programmers, translators, maintainers, should work together in such a
29 way that the magic becomes possible. This is a long and progressive
30 undertaking, and information is available about the progress of the
31 Translation Project.
33 </P>
34 <P>
35 When a package is distributed, there are two kinds of users:
36 <EM>installers</EM> who fetch the distribution, unpack it, configure
37 it, compile it and install it for themselves or others to use; and
38 <EM>end users</EM> that call programs of the package, once these have
39 been installed at their site. GNU <CODE>gettext</CODE> is offering magic
40 for both installers and end users.
42 </P>
46 <H2><A NAME="SEC157" HREF="gettext_toc.html#TOC157">9.1 The Current <TT>`ABOUT-NLS&acute;</TT> Matrix</A></H2>
47 <P>
48 <A NAME="IDX970"></A>
49 <A NAME="IDX971"></A>
50 <A NAME="IDX972"></A>
52 </P>
53 <P>
54 Languages are not equally supported in all packages using GNU
55 <CODE>gettext</CODE>. To know if some package uses GNU <CODE>gettext</CODE>, one
56 may check the distribution for the <TT>`ABOUT-NLS&acute;</TT> information file, for
57 some <TT>`<VAR>ll</VAR>.po&acute;</TT> files, often kept together into some <TT>`po/&acute;</TT>
58 directory, or for an <TT>`intl/&acute;</TT> directory. Internationalized packages
59 have usually many <TT>`<VAR>ll</VAR>.po&acute;</TT> files, where <VAR>ll</VAR> represents
60 the language. section <A HREF="gettext_9.html#SEC159">9.3 Magic for End Users</A> for a complete description of the format
61 for <VAR>ll</VAR>.
63 </P>
64 <P>
65 More generally, a matrix is available for showing the current state
66 of the Translation Project, listing which packages are prepared for
67 multi-lingual messages, and which languages are supported by each.
68 Because this information changes often, this matrix is not kept within
69 this GNU <CODE>gettext</CODE> manual. This information is often found in
70 file <TT>`ABOUT-NLS&acute;</TT> from various distributions, but is also as old as
71 the distribution itself. A recent copy of this <TT>`ABOUT-NLS&acute;</TT> file,
72 containing up-to-date information, should generally be found on the
73 Translation Project sites, and also on most GNU archive sites.
75 </P>
78 <H2><A NAME="SEC158" HREF="gettext_toc.html#TOC158">9.2 Magic for Installers</A></H2>
79 <P>
80 <A NAME="IDX973"></A>
81 <A NAME="IDX974"></A>
83 </P>
84 <P>
85 By default, packages fully using GNU <CODE>gettext</CODE>, internally,
86 are installed in such a way that they to allow translation of
87 messages. At <EM>configuration</EM> time, those packages should
88 automatically detect whether the underlying host system already provides
89 the GNU <CODE>gettext</CODE> functions. If not,
90 the GNU <CODE>gettext</CODE> library should be automatically prepared
91 and used. Installers may use special options at configuration
92 time for changing this behavior. The command <SAMP>`./configure
93 --with-included-gettext&acute;</SAMP> bypasses system <CODE>gettext</CODE> to
94 use the included GNU <CODE>gettext</CODE> instead,
95 while <SAMP>`./configure --disable-nls&acute;</SAMP>
96 produces programs totally unable to translate messages.
98 </P>
99 <P>
100 <A NAME="IDX975"></A>
101 Internationalized packages have usually many <TT>`<VAR>ll</VAR>.po&acute;</TT>
102 files. Unless
103 translations are disabled, all those available are installed together
104 with the package. However, the environment variable <CODE>LINGUAS</CODE>
105 may be set, prior to configuration, to limit the installed set.
106 <CODE>LINGUAS</CODE> should then contain a space separated list of two-letter
107 codes, stating which languages are allowed.
109 </P>
112 <H2><A NAME="SEC159" HREF="gettext_toc.html#TOC159">9.3 Magic for End Users</A></H2>
114 <A NAME="IDX976"></A>
115 <A NAME="IDX977"></A>
116 <A NAME="IDX978"></A>
118 </P>
120 <A NAME="IDX979"></A>
121 We consider here those packages using GNU <CODE>gettext</CODE> internally,
122 and for which the installers did not disable translation at
123 <EM>configure</EM> time. Then, users only have to set the <CODE>LANG</CODE>
124 environment variable to the appropriate <SAMP>`<VAR>ll</VAR>_<VAR>CC</VAR>&acute;</SAMP>
125 combination prior to using the programs in the package. See section <A HREF="gettext_9.html#SEC157">9.1 The Current <TT>`ABOUT-NLS&acute;</TT> Matrix</A>.
126 For example, let's presume a German site. At the shell prompt, users
127 merely have to execute <SAMP>`setenv LANG de_DE&acute;</SAMP> (in <CODE>csh</CODE>) or
128 <SAMP>`export LANG; LANG=de_DE&acute;</SAMP> (in <CODE>sh</CODE>). They could even do
129 this from their <TT>`.login&acute;</TT> or <TT>`.profile&acute;</TT> file.
131 </P>
132 <P><HR><P>
133 Go to the <A HREF="gettext_1.html">first</A>, <A HREF="gettext_8.html">previous</A>, <A HREF="gettext_10.html">next</A>, <A HREF="gettext_22.html">last</A> section, <A HREF="gettext_toc.html">table of contents</A>.
134 </BODY>
135 </HTML>