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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.3 Revision 1.4
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0'?>
2<?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?> 2<?xml-stylesheet href="guide-main.xsl" type="text/xsl"?>
3 3
4<guide link = "/doc/en/guide-localization.xml"> 4<guide>
5<title>Gentoo Linux Localization Instructions</title> 5<title>Gentoo Linux Localization Guide</title>
6<author><mail link="holler@ahsoftware.de"> 6<author title="Author"><mail link="holler@ahsoftware.de">
7 Alexander Holler</mail> 7 Alexander Holler</mail>
8</author> 8</author>
9<author title="Translator/Editor"><mail link="slucy@uchicago.edu">
10 Steven Lucy</mail>
11</author>
9 12
10<abstract>This instructions explains the few steps you need to follow to use Gentoo Linux 13<abstract>
11with another language than english. It also explains what to do to get the Euro character shown.</abstract> 14This guide should help users localize their Gentoo Linux distribution to any
12 15European locale. It uses Germany as a case-study, since it is translated from
13<chapter> 16the German doc. Includes configuration for use of the Euro currency symbol.
14<title>Preface</title> 17</abstract>
15<section>
16 <body>
17 <p>As I'm a German I explain how to enable the german language. If you want
18 another language, you just have to replace the german language code <i>de</i> with
19 the corresponding code for your country, e.g. <i>fr</i> for France or <i>es</i> for Spain.
20 </p>
21 </body>
22</section>
23</chapter>
24 18
25<chapter> 19<chapter>
26<title>Timezone</title> 20<title>Timezone</title>
27<section> 21<section>
28 <body> 22 <body>
29 <p>To enable the right timezone <path>/etc/localtime</path> should point to the 23 <p>In order to keep time properly,
30 appropriate file with the datas for your timezone. You will find those files 24 <path>/etc/localtime</path> must point to the correct time zone
31 in <path>/usr/share/zoneinfo/</path>. 25 data file. Look around in <path>/usr/share/zoneinfo/</path>
32<pre> 26 and pick your timezone or a near-by big city.
27<pre caption="setting the timezone">
33# <i>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i> 28# <i>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i>
29# <i>date</i>
30Sun Feb 16 08:26:44 CET 2003
34</pre> 31</pre>
32<note>Make sure that the three-letter timezone indicator (in this case "CET")
33is correct for your area.</note>
34<note>You can set the value of <i>TZ</i> to be everything after the
35<path>/usr/share/zoninfo</path> in your shell rc file
36(<path>.bash_profile</path> for bash) for a user-level setting. In this case
37<i>TZ="Europe/Berlin"</i>.</note>
35 </p> 38 </p>
36 </body>
37</section>
38</chapter>
39
40<chapter>
41<title>Hardware clock</title>
42<section>
43 <body> 39 </body>
44 <p>If your hardware clock is set to local time and not to GMT you have to correct 40</section>
45 the variable <i>CLOCK</i> in <path>/etc/rc.conf</path>. 41</chapter>
46<pre> 42
43<chapter>
44<title>System Clock</title>
45<section>
46 <body>
47 <p>
48 In most Gentoo Linux installations, your system clock is set to
49 UTC (or GMT, Greenwhich Mean Time) and then your timezone is
50 taken into account to determine the actual, local time. If,
51 for some reason, you need your system clock not to be in UTC,
52 you will need to edit <path>/etc/rc.conf</path> and change the
53 value of <i>CLOCK</i>.
54
55<pre caption="local vs. GMT clock">
56 <codenote>recommended:</codenote>
57 CLOCK="UTC"
58 <codenote>or:</codenote>
47 CLOCK="local" 59 CLOCK="local"
48</pre> 60</pre>
49 </p> 61 </p>
50 </body> 62 </body>
51</section> 63</section>
52</chapter> 64</chapter>
53 65
54<chapter> 66<chapter>
55<title>Language</title> 67<title>POSIX Locale</title>
56<section> 68<section>
57 <body> 69 <body>
58 <p>Telling programms what language you prefer will be done with the environment variable 70 <p>
59 <i>LANG</i>. If you want to set the language system-wide for all users you should export 71 The next step is to set the <i>LANG</i> shell variable, which
60 <i>LANG</i> in <path>/etc/profile</path>. If not, this can be done in through your private 72 is used by your shell and window manager (and some other
61 <path>.bashrc</path> in your home directory. You can find available languages in 73 applications). Valid values can be found in
62 <path>/usr/share/i18n/locales</path>. 74 <path>/usr/share/locale</path> and generally take the form
63<pre> 75 <i>ab_CD</i>, where <i>ab</i> is your two letter language code
76 and <i>CD</i> is your two letter country code. the <i>_CD</i>
77 is left off if your language is only (or primarily) spoken in
78 one country. <i>LANG</i> can be set in
79 <path>/etc/profile</path> if you want it to take effect
80 system-wide, or in <path>~/.bashrc</path> as a user-specific
81 setting.
82<pre caption="setting the POSIX locale">
64 export LANG="de_DE@euro" 83 export LANG="de_DE@euro"
65</pre> 84</pre>
85<note>Appended <i>@euro</i> to your locale if you want to use the new Euro
86currency symbol (&#8364;)</note>
66 </p> 87 </p>
67 </body>
68</section>
69</chapter>
70
71<chapter>
72<title>Keyboard-layout (terminal)</title>
73<section>
74 <body> 88 </body>
75 <p>The keyboard-layout for terminal sessions is set through <i>KEYMAP</i> in 89</section>
76 <path>/etc/rc.conf</path>. You will find the appropriate tables in 90</chapter>
77 <path>/usr/share/keymaps</path>. If you aren't using composed characters with 91
78 tildes (e.g. &#245;), accent graph (e.g. &#232;) or similar, you could use the 92<chapter>
79 nodeadkeys-variants. This will save you to enter a space after typing letters 93<title>Keyboard layout for the console</title>
80 like ~. 94<section>
81<pre> 95 <body>
96 <p>
97 The keyboard layoud used by the console is set in
98 <path>/etc/rc.conf</path> by the <i>KEYMAP</i> variable.
99 Valid values can be found in
100 <path>/usr/share/keymaps/<i>{arch}</i>/</path>.
101 <path>i386</path> has further subdivisions into layout
102 (<path>qwerty/</path>, <path>azerty/</path>, etc.). Some
103 languages have multiple options, so you may wish to experiment
104 to decide which one fits your needs best.
105<pre caption="setting the console keymap">
106 KEYMAP="de"
82 KEYMAP="de-latin1" 107 KEYMAP="de-latin1"
83 # KEYMAP="de-latin1-nodeadkeys" 108 KEYMAP="de-latin1-nodeadkeys"
84</pre> 109</pre>
85 </p> 110 </p>
86 </body>
87</section>
88</chapter>
89
90<chapter>
91<title>Keyboard-layout (X server)</title>
92<section>
93 <body> 111 </body>
112</section>
113</chapter>
114
115<chapter>
116<title>Keyboard layout for the X server</title>
117<section>
118 <body>
94 <p>The keyboard-layout for the X server is set with the option 119 <p>The keyboard layout to be used by the X server is specified
95 <i>XkbLayout</i> in the file <path>/etc/X11/XF86Config</path>. 120 in <path>/etc/X11/XF86Config</path> by the <i>XkbLayout</i>
96<pre> 121 option.
122<pre caption="setting the X keymap">
97 Section "InputDevice" 123 Section "InputDevice"
98 Identifier "Keyboard1" 124 Identifier "Keyboard1"
99 ... 125 ...
100 Option "XkbLayout" "de" 126 Option "XkbLayout" "de"
101 # Option XkbVariant" "nodeadkeys" 127 # Option XkbVariant" "nodeadkeys"
105 </body> 131 </body>
106</section> 132</section>
107</chapter> 133</chapter>
108 134
109<chapter> 135<chapter>
110<title>Euro character (terminal)</title> 136<title>The Euro Symbol for the Console</title>
111<section> 137<section>
112 <body> 138 <body>
113 <p>If you want to see the Euro character in a session without using X, you have 139 <p>
114 to use a console font which contains it. The console font is set with 140 In order to get your console to display the Euro symbol, you
115 <i>CONSOLEFONT</i> in <path>/etc/rc.conf</path>. Available fonts will be find in 141 will need to set <i>CONSOLEFONT</i> in
142 <path>/etc/rc.conf</path> to a file found in
116 <path>/usr/share/consolefonts</path>. 143 <path>/usr/share/consolefonts/</path> (without the
117<pre> 144 <c>.psfu.gz</c>). <c>lat0-16</c> has the Euro symbol.
145<pre caption="setting the console font">
118 CONSOLEFONT="lat0-16" 146 CONSOLEFONT="lat0-16"
119</pre> 147</pre>
120 </p> 148 </p>
121 </body> 149 </body>
122</section> 150</section>
123</chapter> 151</chapter>
124 152
125<chapter> 153<chapter>
126 <title>Euro character (X server)</title> 154 <title>The Euro Symbol in X</title>
127<section> 155<section>
128 <title>General</title> 156 <title>Most Applications</title>
129 <body>
130 <p>Using the above settings and KDE you should already get the Euro character with
131 Alt-Gr-E in all KDE-programs. Remaining the non-KDE-programs.
132 </p><p>Unfortunately this is not as easy as the settings before. You have to set the right
133 font for every single X-program. So I will just explain how to enable the Euro character
134 for xterm and (X)Emacs. You can change the fonts for programs under X in your private
135 <path>.Xdefaults</path> in your home directory. To enable it for other (new) users you could
136 copy this file to <path>/etc/skel</path>.
137 </p>
138 </body> 157 <body>
139</section> 158 <p>Getting the Euro symbol to work properly in X is a little
140 159 bit tougher. The first thing you should do is change the <i>
141<section> 160 fixed</i> and <i>variable</i> definitions in
142 <title>Euro character for xterm</title> 161 <path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end
162 in <i>iso8859-15</i> instead of <i>iso8859-1</i>.
163<pre caption="setting default X fonts">
164 fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
165 variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15
166</pre>
167 </p>
168 <p>Some applications use their own font, and you will have to
169 tell them separately to use a font with the Euro symbol. You
170 can do this at a user-specific level in
171 <path>.Xdefaults</path> (you can copy this file to
172 <path>/etc/skel/</path> for use by new users), or at a global
173 level for any application with a resource file in
174 <path>/usr/X11R6/lib/X11/app-defaults/</path> (like xterm). In
175 these files you generally have to change an existing line,
176 rather than adding a new one. To change our xterm font, for
177 instance:
178<pre caption="setting fonts for xterm">
179 <codenote>(in your home directory)</codenote>
180 $ <i>echo 'XTerm*font: fixed' >> .Xresources </i>
181 $ <i>xrdb -merge .Xresources</i>
182</pre>
183 </p>
143 <body> 184 </body>
144 <p>Insert the following in your <path>.Xdefaults</path>: 185</section>
145<pre> 186
146 xterm*font: 7x13euro 187<section>
147</pre> 188 <title>The Euro symbol in (X)Emacs</title>
148 </p>
149 </body> 189 <body>
150</section> 190 <p>To use the Euro symbol in (X)Emacs, add the following to
151 191 <path>.Xdefaults</path>:
152<section> 192<pre caption="setting the font for emacs">
153 <title>Euro character for (X)Emacs</title>
154 <body>
155 <p>For (X)Emacs you define the font in <path>.Xdefaults</path> as shown below:
156<pre>
157 Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15 193 Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15
158</pre> 194</pre>
159 </p><p>If you are using XEmacs (not Emacs) you will have to tell him what to do with 195 </p><p>For XEmacs (not plain Emacs), you have to do a little
160 the <i>EuroSign</i>. This will be done through a definition in 196 more. In <path>/home/user/.xemacs/init.el</path>, add:
161 <path>.xemacs/init.el</path> in your home directory: 197<pre caption="setting the font for xemacs">
162<pre>
163 (define-key global-map '(EuroSign) '[&#8364;]) 198 (define-key global-map '(EuroSign) '[&#8364;])
164</pre> 199</pre>
165 <note>The character in the square brackets is the Euro character.</note> 200 <note>The symbol in the []s is the Euro symbol.</note>
166 </p> 201 </p>
167 </body> 202 </body>
168</section> 203</section>
169 204
170</chapter> 205</chapter>
171 206
172<version>$Revision: 1.3 $</version> 207<version>$Revision: 1.4 $</version>
173<date>$Date: 2002/11/18 14:40:50 $</date> 208<date>$Date: 2003/03/03 03:42:08 $</date>
174</guide> 209</guide>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20