jpayne@68
|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
jpayne@68
|
2 <html>
|
jpayne@68
|
3 <!-- Created on February, 21 2024 by texi2html 1.78a -->
|
jpayne@68
|
4 <!--
|
jpayne@68
|
5 Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
|
jpayne@68
|
6 Karl Berry <karl@freefriends.org>
|
jpayne@68
|
7 Olaf Bachmann <obachman@mathematik.uni-kl.de>
|
jpayne@68
|
8 and many others.
|
jpayne@68
|
9 Maintained by: Many creative people.
|
jpayne@68
|
10 Send bugs and suggestions to <texi2html-bug@nongnu.org>
|
jpayne@68
|
11
|
jpayne@68
|
12 -->
|
jpayne@68
|
13 <head>
|
jpayne@68
|
14 <title>GNU gettext utilities: 2. The User's View</title>
|
jpayne@68
|
15
|
jpayne@68
|
16 <meta name="description" content="GNU gettext utilities: 2. The User's View">
|
jpayne@68
|
17 <meta name="keywords" content="GNU gettext utilities: 2. The User's View">
|
jpayne@68
|
18 <meta name="resource-type" content="document">
|
jpayne@68
|
19 <meta name="distribution" content="global">
|
jpayne@68
|
20 <meta name="Generator" content="texi2html 1.78a">
|
jpayne@68
|
21 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
jpayne@68
|
22 <style type="text/css">
|
jpayne@68
|
23 <!--
|
jpayne@68
|
24 a.summary-letter {text-decoration: none}
|
jpayne@68
|
25 pre.display {font-family: serif}
|
jpayne@68
|
26 pre.format {font-family: serif}
|
jpayne@68
|
27 pre.menu-comment {font-family: serif}
|
jpayne@68
|
28 pre.menu-preformatted {font-family: serif}
|
jpayne@68
|
29 pre.smalldisplay {font-family: serif; font-size: smaller}
|
jpayne@68
|
30 pre.smallexample {font-size: smaller}
|
jpayne@68
|
31 pre.smallformat {font-family: serif; font-size: smaller}
|
jpayne@68
|
32 pre.smalllisp {font-size: smaller}
|
jpayne@68
|
33 span.roman {font-family:serif; font-weight:normal;}
|
jpayne@68
|
34 span.sansserif {font-family:sans-serif; font-weight:normal;}
|
jpayne@68
|
35 ul.toc {list-style: none}
|
jpayne@68
|
36 -->
|
jpayne@68
|
37 </style>
|
jpayne@68
|
38
|
jpayne@68
|
39
|
jpayne@68
|
40 </head>
|
jpayne@68
|
41
|
jpayne@68
|
42 <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
jpayne@68
|
43
|
jpayne@68
|
44 <table cellpadding="1" cellspacing="1" border="0">
|
jpayne@68
|
45 <tr><td valign="middle" align="left">[<a href="gettext_1.html#SEC1" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
jpayne@68
|
46 <td valign="middle" align="left">[<a href="gettext_3.html#SEC16" title="Next chapter"> >> </a>]</td>
|
jpayne@68
|
47 <td valign="middle" align="left"> </td>
|
jpayne@68
|
48 <td valign="middle" align="left"> </td>
|
jpayne@68
|
49 <td valign="middle" align="left"> </td>
|
jpayne@68
|
50 <td valign="middle" align="left"> </td>
|
jpayne@68
|
51 <td valign="middle" align="left"> </td>
|
jpayne@68
|
52 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
|
jpayne@68
|
53 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
|
jpayne@68
|
54 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td>
|
jpayne@68
|
55 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
|
jpayne@68
|
56 </tr></table>
|
jpayne@68
|
57
|
jpayne@68
|
58 <hr size="2">
|
jpayne@68
|
59 <a name="Users"></a>
|
jpayne@68
|
60 <a name="SEC7"></a>
|
jpayne@68
|
61 <h1 class="chapter"> <a href="gettext_toc.html#TOC7">2. The User's View</a> </h1>
|
jpayne@68
|
62
|
jpayne@68
|
63 <p>Nowadays, when users log into a computer, they usually find that all
|
jpayne@68
|
64 their programs show messages in their native language – at least for
|
jpayne@68
|
65 users of languages with an active free software community, like French or
|
jpayne@68
|
66 German; to a lesser extent for languages with a smaller participation in
|
jpayne@68
|
67 free software and the GNU project, like Hindi and Filipino.
|
jpayne@68
|
68 </p>
|
jpayne@68
|
69 <p>How does this work? How can the user influence the language that is used
|
jpayne@68
|
70 by the programs? This chapter will answer it.
|
jpayne@68
|
71 </p>
|
jpayne@68
|
72
|
jpayne@68
|
73
|
jpayne@68
|
74 <a name="System-Installation"></a>
|
jpayne@68
|
75 <a name="SEC8"></a>
|
jpayne@68
|
76 <h2 class="section"> <a href="gettext_toc.html#TOC8">2.1 Operating System Installation</a> </h2>
|
jpayne@68
|
77
|
jpayne@68
|
78 <p>The default language is often already specified during operating system
|
jpayne@68
|
79 installation. When the operating system is installed, the installer
|
jpayne@68
|
80 typically asks for the language used for the installation process and,
|
jpayne@68
|
81 separately, for the language to use in the installed system. Some OS
|
jpayne@68
|
82 installers only ask for the language once.
|
jpayne@68
|
83 </p>
|
jpayne@68
|
84 <p>This determines the system-wide default language for all users. But the
|
jpayne@68
|
85 installers often give the possibility to install extra localizations for
|
jpayne@68
|
86 additional languages. For example, the localizations of KDE (the K
|
jpayne@68
|
87 Desktop Environment) and LibreOffice are often bundled separately, as one
|
jpayne@68
|
88 installable package per language.
|
jpayne@68
|
89 </p>
|
jpayne@68
|
90 <p>At this point it is good to consider the intended use of the machine: If
|
jpayne@68
|
91 it is a machine designated for personal use, additional localizations are
|
jpayne@68
|
92 probably not necessary. If, however, the machine is in use in an
|
jpayne@68
|
93 organization or company that has international relationships, one can
|
jpayne@68
|
94 consider the needs of guest users. If you have a guest from abroad, for
|
jpayne@68
|
95 a week, what could be his preferred locales? It may be worth installing
|
jpayne@68
|
96 these additional localizations ahead of time, since they cost only a bit
|
jpayne@68
|
97 of disk space at this point.
|
jpayne@68
|
98 </p>
|
jpayne@68
|
99 <p>The system-wide default language is the locale configuration that is used
|
jpayne@68
|
100 when a new user account is created. But the user can have his own locale
|
jpayne@68
|
101 configuration that is different from the one of the other users of the
|
jpayne@68
|
102 same machine. He can specify it, typically after the first login, as
|
jpayne@68
|
103 described in the next section.
|
jpayne@68
|
104 </p>
|
jpayne@68
|
105
|
jpayne@68
|
106 <a name="Setting-the-GUI-Locale"></a>
|
jpayne@68
|
107 <a name="SEC9"></a>
|
jpayne@68
|
108 <h2 class="section"> <a href="gettext_toc.html#TOC9">2.2 Setting the Locale Used by GUI Programs</a> </h2>
|
jpayne@68
|
109
|
jpayne@68
|
110 <p>The immediately available programs in a user's desktop come from a group
|
jpayne@68
|
111 of programs called a “desktop environment”; it usually includes the window
|
jpayne@68
|
112 manager, a web browser, a text editor, and more. The most common free
|
jpayne@68
|
113 desktop environments are KDE, GNOME, and Xfce.
|
jpayne@68
|
114 </p>
|
jpayne@68
|
115 <p>The locale used by GUI programs of the desktop environment can be specified
|
jpayne@68
|
116 in a configuration screen called “control center”, “language settings”
|
jpayne@68
|
117 or “country settings”.
|
jpayne@68
|
118 </p>
|
jpayne@68
|
119 <p>Individual GUI programs that are not part of the desktop environment can
|
jpayne@68
|
120 have their locale specified either in a settings panel, or through environment
|
jpayne@68
|
121 variables.
|
jpayne@68
|
122 </p>
|
jpayne@68
|
123 <p>For some programs, it is possible to specify the locale through environment
|
jpayne@68
|
124 variables, possibly even to a different locale than the desktop's locale.
|
jpayne@68
|
125 This means, instead of starting a program through a menu or from the file
|
jpayne@68
|
126 system, you can start it from the command-line, after having set some
|
jpayne@68
|
127 environment variables. The environment variables can be those specified
|
jpayne@68
|
128 in the next section (<a href="#SEC10">Setting the Locale through Environment Variables</a>); for some versions of
|
jpayne@68
|
129 KDE, however, the locale is specified through a variable <code>KDE_LANG</code>,
|
jpayne@68
|
130 rather than <code>LANG</code> or <code>LC_ALL</code>.
|
jpayne@68
|
131 </p>
|
jpayne@68
|
132
|
jpayne@68
|
133 <a name="Setting-the-POSIX-Locale"></a>
|
jpayne@68
|
134 <a name="SEC10"></a>
|
jpayne@68
|
135 <h2 class="section"> <a href="gettext_toc.html#TOC10">2.3 Setting the Locale through Environment Variables</a> </h2>
|
jpayne@68
|
136
|
jpayne@68
|
137 <p>As a user, if your language has been installed for this package, in the
|
jpayne@68
|
138 simplest case, you only have to set the <code>LANG</code> environment variable
|
jpayne@68
|
139 to the appropriate ‘<samp><var>ll</var>_<var>CC</var></samp>’ combination. For example,
|
jpayne@68
|
140 let's suppose that you speak German and live in Germany. At the shell
|
jpayne@68
|
141 prompt, merely execute
|
jpayne@68
|
142 ‘<samp>setenv LANG de_DE</samp>’ (in <code>csh</code>),
|
jpayne@68
|
143 ‘<samp>export LANG; LANG=de_DE</samp>’ (in <code>sh</code>) or
|
jpayne@68
|
144 ‘<samp>export LANG=de_DE</samp>’ (in <code>bash</code>). This can be done from your
|
jpayne@68
|
145 ‘<tt>.login</tt>’ or ‘<tt>.profile</tt>’ file, once and for all.
|
jpayne@68
|
146 </p>
|
jpayne@68
|
147
|
jpayne@68
|
148
|
jpayne@68
|
149 <a name="Locale-Names"></a>
|
jpayne@68
|
150 <a name="SEC11"></a>
|
jpayne@68
|
151 <h3 class="subsection"> <a href="gettext_toc.html#TOC11">2.3.1 Locale Names</a> </h3>
|
jpayne@68
|
152
|
jpayne@68
|
153 <p>A locale name usually has the form ‘<samp><var>ll</var>_<var>CC</var></samp>’. Here
|
jpayne@68
|
154 ‘<samp><var>ll</var></samp>’ is an ISO 639 two-letter language code, and
|
jpayne@68
|
155 ‘<samp><var>CC</var></samp>’ is an ISO 3166 two-letter country code. For example,
|
jpayne@68
|
156 for German in Germany, <var>ll</var> is <code>de</code>, and <var>CC</var> is <code>DE</code>.
|
jpayne@68
|
157 You find a list of the language codes in appendix <a href="gettext_18.html#SEC373">Language Codes</a> and
|
jpayne@68
|
158 a list of the country codes in appendix <a href="gettext_19.html#SEC376">Country Codes</a>.
|
jpayne@68
|
159 </p>
|
jpayne@68
|
160 <p>You might think that the country code specification is redundant. But in
|
jpayne@68
|
161 fact, some languages have dialects in different countries. For example,
|
jpayne@68
|
162 ‘<samp>de_AT</samp>’ is used for Austria, and ‘<samp>pt_BR</samp>’ for Brazil. The country
|
jpayne@68
|
163 code serves to distinguish the dialects.
|
jpayne@68
|
164 </p>
|
jpayne@68
|
165 <p>Many locale names have an extended syntax
|
jpayne@68
|
166 ‘<samp><var>ll</var>_<var>CC</var>.<var>encoding</var></samp>’ that also specifies the character
|
jpayne@68
|
167 encoding. These are in use because between 2000 and 2005, most users have
|
jpayne@68
|
168 switched to locales in UTF-8 encoding. For example, the German locale on
|
jpayne@68
|
169 glibc systems is nowadays ‘<samp>de_DE.UTF-8</samp>’. The older name ‘<samp>de_DE</samp>’
|
jpayne@68
|
170 still refers to the German locale as of 2000 that stores characters in
|
jpayne@68
|
171 ISO-8859-1 encoding – a text encoding that cannot even accommodate the Euro
|
jpayne@68
|
172 currency sign.
|
jpayne@68
|
173 </p>
|
jpayne@68
|
174 <p>Some locale names use ‘<samp><var>ll</var>_<var>CC</var>@<var>variant</var></samp>’ instead of
|
jpayne@68
|
175 ‘<samp><var>ll</var>_<var>CC</var></samp>’. The ‘<samp>@<var>variant</var></samp>’ can denote any kind of
|
jpayne@68
|
176 characteristics that is not already implied by the language <var>ll</var> and
|
jpayne@68
|
177 the country <var>CC</var>. It can denote a particular monetary unit. For example,
|
jpayne@68
|
178 on glibc systems, ‘<samp>de_DE@euro</samp>’ denotes the locale that uses the Euro
|
jpayne@68
|
179 currency, in contrast to the older locale ‘<samp>de_DE</samp>’ which implies the use
|
jpayne@68
|
180 of the currency before 2002. It can also denote a dialect of the language,
|
jpayne@68
|
181 or the script used to write text (for example, ‘<samp>sr_RS@latin</samp>’ uses the
|
jpayne@68
|
182 Latin script, whereas ‘<samp>sr_RS</samp>’ uses the Cyrillic script to write Serbian),
|
jpayne@68
|
183 or the orthography rules, or similar.
|
jpayne@68
|
184 </p>
|
jpayne@68
|
185 <p>On other systems, some variations of this scheme are used, such as
|
jpayne@68
|
186 ‘<samp><var>ll</var></samp>’. You can get the list of locales supported by your system
|
jpayne@68
|
187 for your language by running the command ‘<samp>locale -a | grep '^<var>ll</var>'</samp>’.
|
jpayne@68
|
188 </p>
|
jpayne@68
|
189 <p>There is also a special locale, called ‘<samp>C</samp>’.
|
jpayne@68
|
190 When it is used, it disables all localization: in this locale, all programs
|
jpayne@68
|
191 standardized by POSIX use English messages and an unspecified character
|
jpayne@68
|
192 encoding (often US-ASCII, but sometimes also ISO-8859-1 or UTF-8, depending on
|
jpayne@68
|
193 the operating system).
|
jpayne@68
|
194 </p>
|
jpayne@68
|
195
|
jpayne@68
|
196 <a name="Locale-Environment-Variables"></a>
|
jpayne@68
|
197 <a name="SEC12"></a>
|
jpayne@68
|
198 <h3 class="subsection"> <a href="gettext_toc.html#TOC12">2.3.2 Locale Environment Variables</a> </h3>
|
jpayne@68
|
199
|
jpayne@68
|
200 <p>A locale is composed of several <em>locale categories</em>, see <a href="gettext_1.html#SEC4">Aspects in Native Language Support</a>.
|
jpayne@68
|
201 When a program looks up locale dependent values, it does this according to
|
jpayne@68
|
202 the following environment variables, in priority order:
|
jpayne@68
|
203 </p>
|
jpayne@68
|
204 <ol>
|
jpayne@68
|
205 <li><a name="IDX33"></a>
|
jpayne@68
|
206 </li><li> <code>LANGUAGE</code>
|
jpayne@68
|
207 <a name="IDX34"></a>
|
jpayne@68
|
208 </li><li> <code>LC_ALL</code>
|
jpayne@68
|
209 <a name="IDX35"></a>
|
jpayne@68
|
210 <a name="IDX36"></a>
|
jpayne@68
|
211 <a name="IDX37"></a>
|
jpayne@68
|
212 <a name="IDX38"></a>
|
jpayne@68
|
213 <a name="IDX39"></a>
|
jpayne@68
|
214 <a name="IDX40"></a>
|
jpayne@68
|
215 </li><li> <code>LC_xxx</code>, according to selected locale category:
|
jpayne@68
|
216 <code>LC_CTYPE</code>, <code>LC_NUMERIC</code>, <code>LC_TIME</code>, <code>LC_COLLATE</code>,
|
jpayne@68
|
217 <code>LC_MONETARY</code>, <code>LC_MESSAGES</code>, ...
|
jpayne@68
|
218 <a name="IDX41"></a>
|
jpayne@68
|
219 </li><li> <code>LANG</code>
|
jpayne@68
|
220 </li></ol>
|
jpayne@68
|
221
|
jpayne@68
|
222 <p>Variables whose value is set but is empty are ignored in this lookup.
|
jpayne@68
|
223 </p>
|
jpayne@68
|
224 <p><code>LANG</code> is the normal environment variable for specifying a locale.
|
jpayne@68
|
225 As a user, you normally set this variable (unless some of the other variables
|
jpayne@68
|
226 have already been set by the system, in ‘<tt>/etc/profile</tt>’ or similar
|
jpayne@68
|
227 initialization files).
|
jpayne@68
|
228 </p>
|
jpayne@68
|
229 <p><code>LC_CTYPE</code>, <code>LC_NUMERIC</code>, <code>LC_TIME</code>, <code>LC_COLLATE</code>,
|
jpayne@68
|
230 <code>LC_MONETARY</code>, <code>LC_MESSAGES</code>, and so on, are the environment
|
jpayne@68
|
231 variables meant to override <code>LANG</code> and affecting a single locale
|
jpayne@68
|
232 category only. For example, assume you are a Swedish user in Spain, and you
|
jpayne@68
|
233 want your programs to handle numbers and dates according to Spanish
|
jpayne@68
|
234 conventions, and only the messages should be in Swedish. Then you could
|
jpayne@68
|
235 create a locale named ‘<samp>sv_ES</samp>’ or ‘<samp>sv_ES.UTF-8</samp>’ by use of the
|
jpayne@68
|
236 <code>localedef</code> program. But it is simpler, and achieves the same effect,
|
jpayne@68
|
237 to set the <code>LANG</code> variable to <code>es_ES.UTF-8</code> and the
|
jpayne@68
|
238 <code>LC_MESSAGES</code> variable to <code>sv_SE.UTF-8</code>; these two locales come
|
jpayne@68
|
239 already preinstalled with the operating system.
|
jpayne@68
|
240 </p>
|
jpayne@68
|
241 <p><code>LC_ALL</code> is an environment variable that overrides all of these.
|
jpayne@68
|
242 It is typically used in scripts that run particular programs. For example,
|
jpayne@68
|
243 <code>configure</code> scripts generated by GNU autoconf use <code>LC_ALL</code> to make
|
jpayne@68
|
244 sure that the configuration tests don't operate in locale dependent ways.
|
jpayne@68
|
245 </p>
|
jpayne@68
|
246 <p>Some systems, unfortunately, set <code>LC_ALL</code> in ‘<tt>/etc/profile</tt>’ or in
|
jpayne@68
|
247 similar initialization files. As a user, you therefore have to unset this
|
jpayne@68
|
248 variable if you want to set <code>LANG</code> and optionally some of the other
|
jpayne@68
|
249 <code>LC_xxx</code> variables.
|
jpayne@68
|
250 </p>
|
jpayne@68
|
251 <p>The <code>LANGUAGE</code> variable is described in the next subsection.
|
jpayne@68
|
252 </p>
|
jpayne@68
|
253
|
jpayne@68
|
254 <a name="The-LANGUAGE-variable"></a>
|
jpayne@68
|
255 <a name="SEC13"></a>
|
jpayne@68
|
256 <h3 class="subsection"> <a href="gettext_toc.html#TOC13">2.3.3 Specifying a Priority List of Languages</a> </h3>
|
jpayne@68
|
257
|
jpayne@68
|
258 <p>Not all programs have translations for all languages. By default, an
|
jpayne@68
|
259 English message is shown in place of a nonexistent translation. If you
|
jpayne@68
|
260 understand other languages, you can set up a priority list of languages.
|
jpayne@68
|
261 This is done through a different environment variable, called
|
jpayne@68
|
262 <code>LANGUAGE</code>. GNU <code>gettext</code> gives preference to <code>LANGUAGE</code>
|
jpayne@68
|
263 over <code>LC_ALL</code> and <code>LANG</code> for the purpose of message handling,
|
jpayne@68
|
264 but you still need to have <code>LANG</code> (or <code>LC_ALL</code>) set to the primary
|
jpayne@68
|
265 language; this is required by other parts of the system libraries.
|
jpayne@68
|
266 For example, some Swedish users who would rather read translations in
|
jpayne@68
|
267 German than English for when Swedish is not available, set <code>LANGUAGE</code>
|
jpayne@68
|
268 to ‘<samp>sv:de</samp>’ while leaving <code>LANG</code> to ‘<samp>sv_SE</samp>’.
|
jpayne@68
|
269 </p>
|
jpayne@68
|
270 <p>Special advice for Norwegian users: The language code for Norwegian
|
jpayne@68
|
271 bokmål changed from ‘<samp>no</samp>’ to ‘<samp>nb</samp>’ recently (in 2003).
|
jpayne@68
|
272 During the transition period, while some message catalogs for this language
|
jpayne@68
|
273 are installed under ‘<samp>nb</samp>’ and some older ones under ‘<samp>no</samp>’, it is
|
jpayne@68
|
274 recommended for Norwegian users to set <code>LANGUAGE</code> to ‘<samp>nb:no</samp>’ so that
|
jpayne@68
|
275 both newer and older translations are used.
|
jpayne@68
|
276 </p>
|
jpayne@68
|
277 <p>In the <code>LANGUAGE</code> environment variable, but not in the other
|
jpayne@68
|
278 environment variables, ‘<samp><var>ll</var>_<var>CC</var></samp>’ combinations can be
|
jpayne@68
|
279 abbreviated as ‘<samp><var>ll</var></samp>’ to denote the language's main dialect.
|
jpayne@68
|
280 For example, ‘<samp>de</samp>’ is equivalent to ‘<samp>de_DE</samp>’ (German as spoken in
|
jpayne@68
|
281 Germany), and ‘<samp>pt</samp>’ to ‘<samp>pt_PT</samp>’ (Portuguese as spoken in Portugal)
|
jpayne@68
|
282 in this context.
|
jpayne@68
|
283 </p>
|
jpayne@68
|
284 <p>Note: The variable <code>LANGUAGE</code> is ignored if the locale is set to
|
jpayne@68
|
285 ‘<samp>C</samp>’. In other words, you have to first enable localization, by setting
|
jpayne@68
|
286 <code>LANG</code> (or <code>LC_ALL</code>) to a value other than ‘<samp>C</samp>’, before you can
|
jpayne@68
|
287 use a language priority list through the <code>LANGUAGE</code> variable.
|
jpayne@68
|
288 </p>
|
jpayne@68
|
289
|
jpayne@68
|
290 <a name="Working-in-a-Windows-console"></a>
|
jpayne@68
|
291 <a name="SEC14"></a>
|
jpayne@68
|
292 <h2 class="section"> <a href="gettext_toc.html#TOC14">2.4 Obtaining good output in a Windows console</a> </h2>
|
jpayne@68
|
293
|
jpayne@68
|
294 <p>On Windows, consoles such as the one started by the <code>cmd.exe</code>
|
jpayne@68
|
295 program do input and output in an encoding, called “OEM code page”,
|
jpayne@68
|
296 that is different from the encoding that text-mode programs usually use,
|
jpayne@68
|
297 called “ANSI code page”. (Note: This problem does not exist for
|
jpayne@68
|
298 Cygwin consoles; these consoles do input and output in the UTF-8
|
jpayne@68
|
299 encoding.) As a workaround, you may request that the programs produce
|
jpayne@68
|
300 output in this “OEM” encoding. To do so, set the environment variable
|
jpayne@68
|
301 <code>OUTPUT_CHARSET</code> to the “OEM” encoding, through a command such as
|
jpayne@68
|
302 </p><table><tr><td> </td><td><pre class="smallexample">set OUTPUT_CHARSET=CP850
|
jpayne@68
|
303 </pre></td></tr></table>
|
jpayne@68
|
304 <p>Note: This has an effect only on strings looked up in message catalogs;
|
jpayne@68
|
305 other categories of text are usually not affected by this setting.
|
jpayne@68
|
306 Note also that this environment variable also affects output sent to a
|
jpayne@68
|
307 file or to a pipe; output to a file is most often expected to be in the
|
jpayne@68
|
308 “ANSI” or in the UTF-8 encoding.
|
jpayne@68
|
309 </p>
|
jpayne@68
|
310 <p>Here are examples of the “ANSI” and “OEM” code pages:
|
jpayne@68
|
311 </p>
|
jpayne@68
|
312 <table>
|
jpayne@68
|
313 <thead><tr><th><p> Territories </p></th><th><p> ANSI encoding </p></th><th><p> OEM encoding
|
jpayne@68
|
314 </p></th></tr></thead>
|
jpayne@68
|
315 <tr><td><p> Western Europe </p></td><td><p> CP1252 </p></td><td><p> CP850
|
jpayne@68
|
316 </p></td></tr>
|
jpayne@68
|
317 <tr><td><p> Slavic countries (Latin 2) </p></td><td><p> CP1250 </p></td><td><p> CP852
|
jpayne@68
|
318 </p></td></tr>
|
jpayne@68
|
319 <tr><td><p> Baltic countries </p></td><td><p> CP1257 </p></td><td><p> CP775
|
jpayne@68
|
320 </p></td></tr>
|
jpayne@68
|
321 <tr><td><p> Russia </p></td><td><p> CP1251 </p></td><td><p> CP866
|
jpayne@68
|
322 </p></td></tr>
|
jpayne@68
|
323 </table>
|
jpayne@68
|
324
|
jpayne@68
|
325
|
jpayne@68
|
326 <a name="Installing-Localizations"></a>
|
jpayne@68
|
327 <a name="SEC15"></a>
|
jpayne@68
|
328 <h2 class="section"> <a href="gettext_toc.html#TOC15">2.5 Installing Translations for Particular Programs</a> </h2>
|
jpayne@68
|
329
|
jpayne@68
|
330 <p>Languages are not equally well supported in all packages using GNU
|
jpayne@68
|
331 <code>gettext</code>, and more translations are added over time. Usually, you
|
jpayne@68
|
332 use the translations that are shipped with the operating system
|
jpayne@68
|
333 or with particular packages that you install afterwards. But you can also
|
jpayne@68
|
334 install newer localizations directly. For doing this, you will need an
|
jpayne@68
|
335 understanding where each localization file is stored on the file system.
|
jpayne@68
|
336 </p>
|
jpayne@68
|
337 <a name="IDX42"></a>
|
jpayne@68
|
338 <p>For programs that participate in the Translation Project, you can start
|
jpayne@68
|
339 looking for translations here:
|
jpayne@68
|
340 <a href="https://translationproject.org/team/index.html">https://translationproject.org/team/index.html</a>.
|
jpayne@68
|
341 </p>
|
jpayne@68
|
342 <p>For programs that are part of the KDE project, the starting point is:
|
jpayne@68
|
343 <a href="https://l10n.kde.org/">https://l10n.kde.org/</a>.
|
jpayne@68
|
344 </p>
|
jpayne@68
|
345 <p>For programs that are part of the GNOME project, the starting point is:
|
jpayne@68
|
346 <a href="https://wiki.gnome.org/TranslationProject">https://wiki.gnome.org/TranslationProject</a>.
|
jpayne@68
|
347 </p>
|
jpayne@68
|
348 <p>For other programs, you may check whether the program's source code package
|
jpayne@68
|
349 contains some ‘<tt><var>ll</var>.po</tt>’ files; often they are kept together in a
|
jpayne@68
|
350 directory called ‘<tt>po/</tt>’. Each ‘<tt><var>ll</var>.po</tt>’ file contains the
|
jpayne@68
|
351 message translations for the language whose abbreviation of <var>ll</var>.
|
jpayne@68
|
352 </p>
|
jpayne@68
|
353
|
jpayne@68
|
354 <table cellpadding="1" cellspacing="1" border="0">
|
jpayne@68
|
355 <tr><td valign="middle" align="left">[<a href="#SEC7" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
jpayne@68
|
356 <td valign="middle" align="left">[<a href="gettext_3.html#SEC16" title="Next chapter"> >> </a>]</td>
|
jpayne@68
|
357 <td valign="middle" align="left"> </td>
|
jpayne@68
|
358 <td valign="middle" align="left"> </td>
|
jpayne@68
|
359 <td valign="middle" align="left"> </td>
|
jpayne@68
|
360 <td valign="middle" align="left"> </td>
|
jpayne@68
|
361 <td valign="middle" align="left"> </td>
|
jpayne@68
|
362 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
|
jpayne@68
|
363 <td valign="middle" align="left">[<a href="gettext_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
|
jpayne@68
|
364 <td valign="middle" align="left">[<a href="gettext_21.html#SEC389" title="Index">Index</a>]</td>
|
jpayne@68
|
365 <td valign="middle" align="left">[<a href="gettext_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
|
jpayne@68
|
366 </tr></table>
|
jpayne@68
|
367 <p>
|
jpayne@68
|
368 <font size="-1">
|
jpayne@68
|
369 This document was generated by <em>Bruno Haible</em> on <em>February, 21 2024</em> using <a href="https://www.nongnu.org/texi2html/"><em>texi2html 1.78a</em></a>.
|
jpayne@68
|
370 </font>
|
jpayne@68
|
371 <br>
|
jpayne@68
|
372
|
jpayne@68
|
373 </p>
|
jpayne@68
|
374 </body>
|
jpayne@68
|
375 </html>
|