Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 30754 | Differences between
and this patch

Collapse All | Expand All

(-)guide-localization.xml (-207 / +213 lines)
Lines 2-229 Link Here
2
<!DOCTYPE guide SYSTEM "http://www.gentoo.org/dtd/guide.dtd">
2
<!DOCTYPE guide SYSTEM "http://www.gentoo.org/dtd/guide.dtd">
3
3
4
<guide link="/doc/en/guide-localization.xml">
4
<guide link="/doc/en/guide-localization.xml">
5
<title>Gentoo Linux Localization Guide</title>
5
  <title>Gentoo Linux Localization Guide</title>
6
<author title="Author"><mail link="holler@gentoo.de">
6
  <author title="Author">
7
        Alexander Holler</mail>
7
    <mail link="holler@gentoo.de">Alexander Holler</mail>
8
</author>
8
  </author>
9
<author title="Translator/Editor"><mail link="slucy@uchicago.edu">
9
  <author title="Translator/Editor">
10
	Steven Lucy</mail>
10
    <mail link="slucy@uchicago.edu">Steven Lucy</mail>
11
</author>
11
  </author>
12
<author title="Editor">
12
  <author title="Editor">
13
  <mail link="pylon@gentoo.org">Lars Weiler</mail>
13
    <mail link="pylon@gentoo.org">Lars Weiler</mail>
14
</author>
14
  </author>
15
15
16
<abstract>
16
  <abstract>This guide should help users localize their Gentoo Linux
17
This guide should help users localize their Gentoo Linux distribution to any
17
  distribution to any European locale.  It uses Germany as a case-study, since
18
European locale.  It uses Germany as a case-study, since it is translated from
18
  it is translated from the German doc.  Includes configuration for use of the
19
the German doc.  Includes configuration for use of the Euro currency symbol.
19
  Euro currency symbol.</abstract>
20
</abstract>
20
21
21
  <version>1.6</version>
22
<version>1.6</version>
22
  <date>October 9, 2003</date>
23
<date>October 9, 2003</date>
23
24
24
  <chapter>
25
<chapter>
25
    <title>Timezone</title>
26
<title>Timezone</title>
26
    <section>
27
<section>
27
      <body>
28
        <body>
28
29
                <p>In order to keep time properly,
29
        <p>In order to keep time properly, <path>/etc/localtime</path> must
30
		<path>/etc/localtime</path> must point to the correct time zone
30
        point to the correct time zone data file.  Look around in
31
		data file.  Look around in <path>/usr/share/zoneinfo/</path>
31
        <path>/usr/share/zoneinfo/</path> and pick your timezone or a near-by
32
		and pick your timezone or a near-by big city.
32
        big city.</p>
33
<pre caption="setting the timezone">
33
34
        <pre caption="setting the timezone">
34
# <i>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i>
35
# <i>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i>
35
# <i>date</i>
36
# <i>date</i>
36
Sun Feb 16 08:26:44 CET 2003
37
Sun Feb 16 08:26:44 CET 2003
37
</pre>
38
</pre>
38
<note>Make sure that the three-letter timezone indicator (in this case "CET")
39
39
is correct for your area.</note>
40
        <note>Make sure that the three-letter timezone indicator (in this case
40
<note>You can set the value of <i>TZ</i> to be everything after the
41
        "CET") is correct for your area.</note>
41
<path>/usr/share/zoninfo</path> in your shell rc file
42
42
(<path>.bash_profile</path> for bash) for a user-level setting.  In this case
43
        <note>You can set the value of <i>TZ</i> to be everything after the
43
<i>TZ="Europe/Berlin"</i>.</note>
44
        <path>/usr/share/zoninfo</path> in your shell rc file
44
		</p>
45
        (<path>.bash_profile</path> for bash) for a user-level setting.  In this
45
        </body>
46
        case <i>TZ="Europe/Berlin"</i>.</note>
46
</section>
47
47
</chapter>
48
      </body>
48
49
    </section>
49
<chapter>
50
  </chapter>
50
<title>System Clock</title>
51
51
<section>
52
  <chapter>
52
        <body>
53
    <title>System Clock</title>
53
                <p>
54
    <section>
54
		In most Gentoo Linux installations, your system clock is set to
55
      <body>
55
		UTC (or GMT, Greenwhich Mean Time) and then your timezone is
56
56
		taken into account to determine the actual, local time.  If,
57
        <p>In most Gentoo Linux installations, your system clock is set to UTC
57
		for some reason, you need your system clock not to be in UTC,
58
        (or GMT, Greenwhich Mean Time) and then your timezone is taken into
58
		you will need to edit <path>/etc/rc.conf</path> and change the
59
        account to determine the actual, local time.  If, for some reason, you
59
		value of <i>CLOCK</i>.
60
        need your system clock not to be in UTC, you will need to edit
60
61
        <path>/etc/rc.conf</path> and change the value of <i>CLOCK</i>.</p>
61
<pre caption="local vs. GMT clock">
62
62
 <codenote>recommended:</codenote>
63
        <pre caption="local vs. GMT clock">
63
 CLOCK="UTC"
64
<codenote>recommended:</codenote>
64
 <codenote>or:</codenote>
65
CLOCK="UTC"
65
 CLOCK="local"
66
<codenote>or:</codenote>
66
</pre>
67
CLOCK="local"
67
		</p>
68
        </pre>
68
        </body>
69
69
</section>
70
      </body>
70
</chapter>
71
    </section>
71
72
  </chapter>
72
<chapter>
73
73
<title>POSIX Locale</title>
74
  <chapter>
74
<section>
75
    <title>POSIX Locale</title>
75
        <body>
76
    <section>
76
                <p>
77
      <body>
77
		The next step is to set the <i>LANG</i> shell variable, which
78
78
		is used by your shell and window manager (and some other
79
        <p>The next step is to set the <i>LANG</i> shell variable, which is used
79
		applications).  Valid values can be found in
80
        by your shell and window manager (and some other applications).  Valid
80
		<path>/usr/share/locale</path> and generally take the form
81
        values can be found in <path>/usr/share/locale</path> and generally take
81
		<i>ab_CD</i>, where <i>ab</i> is your two letter language code
82
        the form <i>ab_CD</i>, where <i>ab</i> is your two letter language code
82
		and <i>CD</i> is your two letter country code.  the <i>_CD</i>
83
        and <i>CD</i> is your two letter country code.  the <i>_CD</i> is left
83
		is left off if your language is only (or primarily) spoken in
84
        off if your language is only (or primarily) spoken in one country.
84
		one country.  <i>LANG</i> can be set in
85
        <i>LANG</i> can be set in <path>/etc/profile</path> if you want it to
85
		<path>/etc/profile</path> if you want it to take effect
86
        take effect system-wide, or in <path>~/.bashrc</path> as a user-specific
86
		system-wide, or in <path>~/.bashrc</path> as a user-specific
87
        setting.</p>
87
		setting.
88
88
<pre caption="setting the POSIX locale">
89
<pre caption="setting the POSIX locale">
89
 export LANG="de_DE@euro"
90
export LANG="de_DE@euro"
90
</pre>
91
</pre>
91
<note>Appended <i>@euro</i> to your locale if you want to use the new Euro
92
92
currency symbol (&#8364;)</note>
93
        <note>Appended <i>@euro</i> to your locale if you want to use the new
93
		</p>
94
        Euro currency symbol (&#8364;)</note>
94
        </body>
95
95
</section>
96
      </body>
96
</chapter>
97
    </section>
97
98
  </chapter>
98
<chapter>
99
99
<title>Keyboard layout for the console</title>
100
  <chapter>
100
<section>
101
    <title>Keyboard layout for the console</title>
101
        <body>
102
    <section>
102
                <p>
103
      <body>
103
		The keyboard layoud used by the console is set in
104
104
		<path>/etc/rc.conf</path> by the <i>KEYMAP</i> variable.
105
        <p>The keyboard layoud used by the console is set in
105
		Valid values can be found in
106
        <path>/etc/rc.conf</path> by the <i>KEYMAP</i> variable.  Valid values
106
		<path>/usr/share/keymaps/<i>{arch}</i>/</path>.
107
        can be found in <path>/usr/share/keymaps/<i>{arch}</i>/</path>.
107
		<path>i386</path> has further subdivisions into layout
108
        <path>i386</path> has further subdivisions into layout
108
		(<path>qwerty/</path>, <path>azerty/</path>, etc.).  Some
109
        (<path>qwerty/</path>, <path>azerty/</path>, etc.).  Some languages have
109
		languages have multiple options, so you may wish to experiment
110
        multiple options, so you may wish to experiment to decide which one fits
110
		to decide which one fits your needs best.
111
        your needs best.</p>
111
<pre caption="setting the console keymap">
112
112
 KEYMAP="de"
113
        <pre caption="setting the console keymap">
113
 KEYMAP="de-latin1"
114
KEYMAP="de"
114
 KEYMAP="de-latin1-nodeadkeys"
115
KEYMAP="de-latin1"
115
</pre>
116
KEYMAP="de-latin1-nodeadkeys"
116
		</p>
117
        </pre>
117
        </body>
118
118
</section>
119
      </body>
119
</chapter>
120
    </section>
120
121
  </chapter>
121
<chapter>
122
122
<title>Keyboard layout for the X server</title>
123
  <chapter>
123
<section>
124
    <title>Keyboard layout for the X server</title>
124
        <body>
125
    <section>
125
                <p>The keyboard layout to be used by the X server is specified
126
      <body>
126
		in <path>/etc/X11/XF86Config</path> by the <i>XkbLayout</i>
127
127
		option.
128
        <p>The keyboard layout to be used by the X server is specified in
128
<pre caption="setting the X keymap">
129
        <path>/etc/X11/XF86Config</path> by the <i>XkbLayout</i> option.</p>
130
131
        <pre caption="setting the X keymap">
129
 Section "InputDevice"
132
 Section "InputDevice"
130
     Identifier  "Keyboard1"
133
     Identifier  "Keyboard1"
131
     ...
134
     ...
132
     Option "XkbLayout"    "de"
135
     Option "XkbLayout"    "de"
133
     # Option XkbVariant"  "nodeadkeys"
136
     # Option XkbVariant"  "nodeadkeys"
134
     ...
137
     ...
135
</pre>
138
        </pre>
136
		</p>
137
        </body>
138
</section>
139
</chapter>
140
141
<chapter>
142
  <title>KDE</title>
143
  <section>
144
    <body>
145
139
146
      <p>For KDE you have to install the kde-i18n package with the appropriate
140
      </body>
147
      LINGUAS environment variable set:</p>
141
    </section>
142
  </chapter>
148
143
149
      <pre caption="Install localized KDE">
144
  <chapter>
150
# <i>LINGUAS="de" emerge kde-i18n</i>
145
    <title>KDE</title>
151
      </pre>
146
    <section>
147
      <body>
152
148
153
    </body>
149
        <p>For KDE you have to install the kde-i18n package with the appropriate
154
  </section>
150
        LINGUAS environment variable set:</p>
155
</chapter>
156
157
<chapter>
158
<title>The Euro Symbol for the Console</title>
159
<section>
160
        <body>
161
                <p>
162
		In order to get your console to display the Euro symbol, you
163
		will need to set <i>CONSOLEFONT</i> in
164
		<path>/etc/rc.conf</path> to a file found in
165
		<path>/usr/share/consolefonts/</path> (without the
166
		<c>.psfu.gz</c>).  <c>lat9w-16</c> has the Euro symbol.
167
<pre caption="setting the console font">
168
 CONSOLEFONT="lat9w-16"
169
</pre>
170
		</p>
171
        </body>
172
</section>
173
</chapter>
174
175
<chapter>
176
        <title>The Euro Symbol in X</title>
177
<section>
178
        <title>Most Applications</title>
179
        <body>
180
                <p>Getting the Euro symbol to work properly in X is a little
181
		bit tougher.  The first thing you should do is change the <i>
182
		fixed</i> and <i>variable</i> definitions in
183
		<path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end
184
		in <i>iso8859-15</i> instead of <i>iso8859-1</i>.
185
<pre caption="setting default X fonts">
186
 fixed        -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
187
 variable     -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15
188
</pre>
189
		</p>
190
		<p>Some applications use their own font, and you will have to
191
		tell them separately to use a font with the Euro symbol.  You
192
		can do this at a user-specific level in
193
		<path>.Xdefaults</path> (you can copy this file to
194
		<path>/etc/skel/</path> for use by new users), or at a global
195
		level for any application with a resource file in
196
		<path>/usr/X11R6/lib/X11/app-defaults/</path> (like xterm).  In
197
		these files you generally have to change an existing line,
198
		rather than adding a new one.  To change our xterm font, for
199
		instance:
200
<pre caption="setting fonts for xterm">
201
 <codenote>(in your home directory)</codenote>
202
 $ <i>echo 'XTerm*font: fixed' >> .Xresources </i>
203
 $ <i>xrdb -merge .Xresources</i>
204
</pre>
205
		</p>
206
        </body>
207
</section>
208
209
<section>
210
        <title>The Euro symbol in (X)Emacs</title>
211
        <body>
212
                <p>To use the Euro symbol in (X)Emacs, add the following to
213
		<path>.Xdefaults</path>:
214
<pre caption="setting the font for emacs">
215
 Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15
216
</pre>
217
		</p><p>For XEmacs (not plain Emacs), you have to do a little
218
		more.  In <path>/home/user/.xemacs/init.el</path>, add:
219
<pre caption="setting the font for xemacs">
220
 (define-key global-map '(EuroSign) '[&#8364;])
221
</pre>
222
		<note>The symbol in the []s is the Euro symbol.</note>
223
		</p>
224
        </body>
225
</section>
226
151
227
</chapter>
152
        <pre caption="Install localized KDE">
153
# <i>LINGUAS="de" emerge kde-i18n</i>
154
        </pre>
228
155
156
      </body>
157
    </section>
158
  </chapter>
159
160
  <chapter>
161
    <title>The Euro Symbol for the Console</title>
162
    <section>
163
      <body>
164
165
        <p>In order to get your console to display the Euro symbol, you will
166
        need to set <i>CONSOLEFONT</i> in <path>/etc/rc.conf</path> to a file
167
        found in <path>/usr/share/consolefonts/</path> (without the
168
        <c>.psfu.gz</c>).  <c>lat9w-16</c> has the Euro symbol.</p>
169
170
        <pre caption="setting the console font">
171
CONSOLEFONT="lat9w-16"
172
        </pre>
173
174
      </body>
175
    </section>
176
  </chapter>
177
178
  <chapter>
179
    <title>The Euro Symbol in X</title>
180
    <section>
181
      <title>Most Applications</title>
182
      <body>
183
184
        <p>Getting the Euro symbol to work properly in X is a little bit
185
        tougher.  The first thing you should do is change the <i> fixed</i> and
186
        <i>variable</i> definitions in
187
        <path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end in
188
        <i>iso8859-15</i> instead of <i>iso8859-1</i>.</p>
189
190
        <pre caption="setting default X fonts">
191
fixed        -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
192
variable     -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15
193
        </pre>
194
195
        <p>Some applications use their own font, and you will have to tell them
196
        separately to use a font with the Euro symbol.  You can do this at a
197
        user-specific level in <path>.Xdefaults</path> (you can copy this file
198
        to <path>/etc/skel/</path> for use by new users), or at a global level
199
        for any application with a resource file in
200
        <path>/usr/X11R6/lib/X11/app-defaults/</path> (like xterm).  In these
201
        files you generally have to change an existing line, rather than adding
202
        a new one.  To change our xterm font, for instance:</p>
203
204
        <pre caption="setting fonts for xterm">
205
<codenote>(in your home directory)</codenote>
206
$ <i>echo 'XTerm*font: fixed' >> .Xresources </i>
207
$ <i>xrdb -merge .Xresources</i>
208
        </pre>
209
210
      </body>
211
    </section>
212
213
    <section>
214
      <title>The Euro symbol in (X)Emacs</title>
215
      <body>
216
217
        <p>To use the Euro symbol in (X)Emacs, add the following to
218
        <path>.Xdefaults</path>:</p>
219
220
        <pre caption="setting the font for emacs">
221
Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15
222
        </pre>
223
224
        <p>For XEmacs (not plain Emacs), you have to do a little more.  In
225
        <path>/home/user/.xemacs/init.el</path>, add:</p>
226
227
        <pre caption="setting the font for xemacs">
228
(define-key global-map '(EuroSign) '[&#8364;])
229
        </pre>
230
231
        <note>The symbol in the []s is the Euro symbol.</note>
232
      </body>
233
    </section>
234
  </chapter>
229
</guide>
235
</guide>

Return to bug 30754