/[gentoo]/xml/htdocs/doc/en/guide-localization.xml
Gentoo

Contents of /xml/htdocs/doc/en/guide-localization.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations) (download) (as text)
Sun Apr 11 13:50:26 2004 UTC (11 years, 3 months ago) by swift
Branch: MAIN
Changes since 1.13: +28 -3 lines
File MIME type: application/xml
#46170 - Add information on generating specific locales

1 swift 1.6 <?xml version='1.0' encoding='UTF-8'?>
2 swift 1.14 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.13 2004/04/11 10:52:16 cam Exp $ -->
3 swift 1.6 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4    
5     <guide link="/doc/en/guide-localization.xml">
6 antifa 1.4 <title>Gentoo Linux Localization Guide</title>
7 dertobi123 1.12 <author title="Author">
8     <mail link="holler@gentoo.de">Alexander Holler</mail>
9 drobbins 1.1 </author>
10 dertobi123 1.12 <author title="Translator/Editor">
11     <mail link="slucy@uchicago.edu">Steven Lucy</mail>
12 antifa 1.4 </author>
13 bennyc 1.8 <author title="Editor">
14     <mail link="bennyc@gentoo.org">Benny Chuang</mail>
15     </author>
16 dertobi123 1.11 <author title="Editor">
17     <mail link="pylon@gentoo.org">Lars Weiler</mail>
18     </author>
19 dertobi123 1.12
20 antifa 1.4 <abstract>
21     This guide should help users localize their Gentoo Linux distribution to any
22 dertobi123 1.12 European locale. It uses Germany as a case-study, since it is translated from
23     the German doc. Includes configuration for use of the Euro currency symbol.
24 antifa 1.4 </abstract>
25 drobbins 1.1
26 swift 1.14 <version>1.10</version>
27     <date>April 11, 2004</date>
28 dertobi123 1.12
29 drobbins 1.1 <chapter>
30     <title>Timezone</title>
31     <section>
32 dertobi123 1.12 <body>
33    
34     <p>
35     In order to keep time properly, <path>/etc/localtime</path> must point to
36     the correct time zone data file. Look around in
37     <path>/usr/share/zoneinfo/</path> and pick your timezone or a near-by big city.
38     </p>
39    
40 antifa 1.4 <pre caption="setting the timezone">
41 drobbins 1.1 # <i>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i>
42 antifa 1.4 # <i>date</i>
43     Sun Feb 16 08:26:44 CET 2003
44 drobbins 1.1 </pre>
45 dertobi123 1.12
46     <note>
47     Make sure that the three-letter timezone indicator (in this case "CET")
48     is correct for your area.
49     </note>
50    
51     <note>
52 cam 1.13 You can set the value of <c>TZ</c> to be everything after the
53 aaby 1.10 <path>/usr/share/zoneinfo</path> in your shell rc file
54 antifa 1.4 (<path>.bash_profile</path> for bash) for a user-level setting. In this case
55 cam 1.13 <c>TZ="Europe/Berlin"</c>.
56 dertobi123 1.12 </note>
57    
58     </body>
59 drobbins 1.1 </section>
60     </chapter>
61    
62     <chapter>
63 antifa 1.4 <title>System Clock</title>
64 drobbins 1.1 <section>
65 dertobi123 1.12 <body>
66    
67     <p>
68     In most Gentoo Linux installations, your system clock is set to
69     UTC (or GMT, Greenwhich Mean Time) and then your timezone is
70     taken into account to determine the actual, local time. If,
71     for some reason, you need your system clock not to be in UTC,
72     you will need to edit <path>/etc/rc.conf</path> and change the
73 cam 1.13 value of <c>CLOCK</c>.
74 dertobi123 1.12 </p>
75 antifa 1.4
76     <pre caption="local vs. GMT clock">
77 dertobi123 1.12 <codenote>recommended:</codenote>
78     CLOCK="UTC"
79     <codenote>or:</codenote>
80     CLOCK="local"
81 drobbins 1.1 </pre>
82 dertobi123 1.12
83     </body>
84 drobbins 1.1 </section>
85     </chapter>
86    
87     <chapter>
88 antifa 1.4 <title>POSIX Locale</title>
89 drobbins 1.1 <section>
90 swift 1.14 <title>Using Existing Locales</title>
91 dertobi123 1.12 <body>
92    
93     <p>
94 cam 1.13 The next step is to set the <c>LANG</c> shell variable, which
95 dertobi123 1.12 is used by your shell and window manager (and some other
96     applications). Valid values can be found in
97     <path>/usr/share/locale</path> and generally take the form
98 cam 1.13 <c>ab_CD</c>, where <c>ab</c> is your two letter language code
99     and <c>CD</c> is your two letter country code. The <c>_CD</c>
100 dertobi123 1.12 is left off if your language is only (or primarily) spoken in
101 cam 1.13 one country. <c>LANG</c> can be set in
102 dertobi123 1.12 <path>/etc/profile</path> if you want it to take effect
103     system-wide, or in <path>~/.bashrc</path> as a user-specific
104     setting.
105     </p>
106    
107 antifa 1.4 <pre caption="setting the POSIX locale">
108 dertobi123 1.12 export LANG="de_DE@euro"
109 drobbins 1.1 </pre>
110 dertobi123 1.12
111     <note>
112 cam 1.13 Appended <c>@euro</c> to your locale if you want to use the new Euro
113 dertobi123 1.12 currency symbol (&#8364;)
114     </note>
115    
116     </body>
117 drobbins 1.1 </section>
118 swift 1.14 <section>
119     <title>Generating Specific Locales</title>
120     <body>
121    
122     <p>
123     If you use a locale that isn't available by default, you should use
124     <c>localedef</c> to generate your locale. For instance:
125     </p>
126    
127     <pre caption="Generating a locale using localedef">
128     # <i>localedef -c -i en_US -f ISO-8859-15 en_US.ISO-8859-15</i>
129     </pre>
130    
131     <p>
132     After having generated the locale, you can export the LANG variable as you see
133     fit.
134     </p>
135    
136     <pre caption="Exporting the LANG variable">
137     # <i>export LANG="en_US.ISO-8859-15"</i>
138     </pre>
139    
140     </body>
141     </section>
142 drobbins 1.1 </chapter>
143    
144     <chapter>
145 antifa 1.4 <title>Keyboard layout for the console</title>
146 drobbins 1.1 <section>
147 dertobi123 1.12 <body>
148    
149     <p>
150     The keyboard layout used by the console is set in
151 cam 1.13 <path>/etc/rc.conf</path> by the <c>KEYMAP</c> variable.
152 dertobi123 1.12 Valid values can be found in
153 cam 1.13 <path>/usr/share/keymaps/<c>{arch}</c>/</path>.
154 dertobi123 1.12 <path>i386</path> has further subdivisions into layout
155     (<path>qwerty/</path>, <path>azerty/</path>, etc.). Some
156     languages have multiple options, so you may wish to experiment
157     to decide which one fits your needs best.
158     </p>
159    
160 antifa 1.4 <pre caption="setting the console keymap">
161 dertobi123 1.12 KEYMAP="de"
162     KEYMAP="de-latin1"
163     KEYMAP="de-latin1-nodeadkeys"
164 drobbins 1.1 </pre>
165 dertobi123 1.12
166     </body>
167 drobbins 1.1 </section>
168     </chapter>
169    
170     <chapter>
171 antifa 1.4 <title>Keyboard layout for the X server</title>
172 drobbins 1.1 <section>
173 dertobi123 1.12 <body>
174    
175     <p>
176     The keyboard layout to be used by the X server is specified
177 cam 1.13 in <path>/etc/X11/XF86Config</path> by the <c>XkbLayout</c>
178 dertobi123 1.12 option.
179     </p>
180    
181 antifa 1.4 <pre caption="setting the X keymap">
182 drobbins 1.1 Section "InputDevice"
183     Identifier "Keyboard1"
184     ...
185     Option "XkbLayout" "de"
186 aaby 1.10 # Option "XkbVariant" "nodeadkeys"
187 drobbins 1.1 ...
188     </pre>
189 dertobi123 1.12
190     </body>
191 drobbins 1.1 </section>
192     </chapter>
193    
194     <chapter>
195 dertobi123 1.11 <title>KDE</title>
196     <section>
197     <body>
198    
199     <p>
200     For KDE you have to install the kde-i18n package with the appropriate
201     LINGUAS environment variable set:</p>
202    
203     <pre caption="Install localized KDE">
204     # <i>LINGUAS="de" emerge kde-i18n</i>
205     </pre>
206    
207     </body>
208     </section>
209     </chapter>
210    
211     <chapter>
212 antifa 1.4 <title>The Euro Symbol for the Console</title>
213 drobbins 1.1 <section>
214 dertobi123 1.12 <body>
215    
216     <p>
217     In order to get your console to display the Euro symbol, you
218 cam 1.13 will need to set <c>CONSOLEFONT</c> in
219 dertobi123 1.12 <path>/etc/rc.conf</path> to a file found in
220     <path>/usr/share/consolefonts/</path> (without the
221     <c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol.
222     </p>
223    
224 antifa 1.4 <pre caption="setting the console font">
225 dertobi123 1.12 CONSOLEFONT="lat9w-16"
226 drobbins 1.1 </pre>
227 dertobi123 1.12
228     </body>
229 drobbins 1.1 </section>
230     </chapter>
231    
232     <chapter>
233 dertobi123 1.12 <title>The Euro Symbol in X</title>
234 drobbins 1.1 <section>
235 dertobi123 1.12 <title>Most Applications</title>
236     <body>
237    
238     <p>
239     Getting the Euro symbol to work properly in X is a little
240 cam 1.13 bit tougher. The first thing you should do is change the <c>fixed</c>
241     and <c>variable</c> definitions in
242 dertobi123 1.12 <path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end
243 cam 1.13 in <c>iso8859-15</c> instead of <c>iso8859-1</c>.
244 dertobi123 1.12 </p>
245    
246 antifa 1.4 <pre caption="setting default X fonts">
247 dertobi123 1.12 fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
248     variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15
249 antifa 1.4 </pre>
250 dertobi123 1.12
251     <p>
252     Some applications use their own font, and you will have to
253     tell them separately to use a font with the Euro symbol. You
254     can do this at a user-specific level in
255     <path>.Xdefaults</path> (you can copy this file to
256     <path>/etc/skel/</path> for use by new users), or at a global
257     level for any application with a resource file in
258     <path>/usr/X11R6/lib/X11/app-defaults/</path> (like xterm). In
259     these files you generally have to change an existing line,
260     rather than adding a new one. To change our xterm font, for
261     instance:
262     </p>
263    
264 antifa 1.4 <pre caption="setting fonts for xterm">
265 dertobi123 1.12 <codenote>(in your home directory)</codenote>
266     # <i>echo 'XTerm*font: fixed' >> .Xresources </i>
267     # <i>xrdb -merge .Xresources</i>
268 drobbins 1.1 </pre>
269 dertobi123 1.12
270     </body>
271 drobbins 1.1 </section>
272 dertobi123 1.12 <section>
273     <title>The Euro symbol in (X)Emacs</title>
274     <body>
275    
276     <p>
277     To use the Euro symbol in (X)Emacs, add the following to
278     <path>.Xdefaults</path>:
279     </p>
280 drobbins 1.1
281 antifa 1.4 <pre caption="setting the font for emacs">
282 dertobi123 1.12 Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15
283 drobbins 1.1 </pre>
284 dertobi123 1.12
285     <p>
286     For XEmacs (not plain Emacs), you have to do a little
287     more. In <path>/home/user/.xemacs/init.el</path>, add:
288     </p>
289    
290 antifa 1.4 <pre caption="setting the font for xemacs">
291 dertobi123 1.12 (define-key global-map '(EuroSign) '[&#8364;])
292 drobbins 1.1 </pre>
293 dertobi123 1.12
294     <note>
295     The symbol in the []s is the Euro symbol.
296     </note>
297    
298     </body>
299     </section>
300     <section>
301     <title>Language for OpenOffice</title>
302     <body>
303    
304     <note>
305     Customized default language is not available for openoffice-bin ebuild. The
306     default language in the openoffice-bin is ENUS.
307     </note>
308    
309     <p>
310     The default language for OpenOffice is set as "ENUS"(01). If you wish to
311     change the default language for OpenOffice, check the ebuild for the
312     default language code.
313     </p>
314    
315 bennyc 1.8 <pre caption="emerge openoffice with desired default language">
316     # <i>LANGUAGE="01" emerge openoffice</i>
317     <comment>01 is the ENUS language code for openoffice</comment>
318     </pre>
319 dertobi123 1.12
320     </body>
321 bennyc 1.8 </section>
322 drobbins 1.1 </chapter>
323    
324     </guide>

  ViewVC Help
Powered by ViewVC 1.1.20