/[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.12 Revision 1.15
1<?xml version='1.0' encoding='UTF-8'?> 1<?xml version='1.0' encoding='UTF-8'?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.12 2004/02/12 22:25:42 dertobi123 Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.15 2004/11/01 20:15:44 dertobi123 Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/guide-localization.xml"> 5<guide link="/doc/en/guide-localization.xml">
6<title>Gentoo Linux Localization Guide</title> 6<title>Gentoo Linux Localization Guide</title>
7<author title="Author"> 7<author title="Author">
13<author title="Editor"> 13<author title="Editor">
14 <mail link="bennyc@gentoo.org">Benny Chuang</mail> 14 <mail link="bennyc@gentoo.org">Benny Chuang</mail>
15</author> 15</author>
16<author title="Editor"> 16<author title="Editor">
17 <mail link="pylon@gentoo.org">Lars Weiler</mail> 17 <mail link="pylon@gentoo.org">Lars Weiler</mail>
18</author>
19<author title="Editor">
20 <mail link="dertobi123@gentoo.org">Tobias Scherbaum</mail>
18</author> 21</author>
19 22
20<abstract> 23<abstract>
21This guide should help users localize their Gentoo Linux distribution to any 24This guide should help users localize their Gentoo Linux distribution to any
22European locale. It uses Germany as a case-study, since it is translated from 25European locale. It uses Germany as a case-study, since it is translated from
23the German doc. Includes configuration for use of the Euro currency symbol. 26the German doc. Includes configuration for use of the Euro currency symbol.
24</abstract> 27</abstract>
25 28
26<version>1.9</version> 29<version>1.11</version>
27<date>February 12, 2004</date> 30<date>November 1, 2004</date>
28 31
29<chapter> 32<chapter>
30<title>Timezone</title> 33<title>Timezone</title>
31<section> 34<section>
32<body> 35<body>
47Make sure that the three-letter timezone indicator (in this case "CET") 50Make sure that the three-letter timezone indicator (in this case "CET")
48is correct for your area. 51is correct for your area.
49</note> 52</note>
50 53
51<note> 54<note>
52You can set the value of <i>TZ</i> to be everything after the 55You can set the value of <c>TZ</c> to be everything after the
53<path>/usr/share/zoneinfo</path> in your shell rc file 56<path>/usr/share/zoneinfo</path> in your shell rc file
54(<path>.bash_profile</path> for bash) for a user-level setting. In this case 57(<path>.bash_profile</path> for bash) for a user-level setting. In this case
55<i>TZ="Europe/Berlin"</i>. 58<c>TZ="Europe/Berlin"</c>.
56</note> 59</note>
57 60
58</body> 61</body>
59</section> 62</section>
60</chapter> 63</chapter>
68In most Gentoo Linux installations, your system clock is set to 71In most Gentoo Linux installations, your system clock is set to
69UTC (or GMT, Greenwhich Mean Time) and then your timezone is 72UTC (or GMT, Greenwhich Mean Time) and then your timezone is
70taken into account to determine the actual, local time. If, 73taken into account to determine the actual, local time. If,
71for some reason, you need your system clock not to be in UTC, 74for some reason, you need your system clock not to be in UTC,
72you will need to edit <path>/etc/rc.conf</path> and change the 75you will need to edit <path>/etc/rc.conf</path> and change the
73value of <i>CLOCK</i>. 76value of <c>CLOCK</c>.
74</p> 77</p>
75 78
76<pre caption="local vs. GMT clock"> 79<pre caption="local vs. GMT clock">
77<codenote>recommended:</codenote> 80<codenote>recommended:</codenote>
78CLOCK="UTC" 81CLOCK="UTC"
85</chapter> 88</chapter>
86 89
87<chapter> 90<chapter>
88<title>POSIX Locale</title> 91<title>POSIX Locale</title>
89<section> 92<section>
93<title>Using Existing Locales</title>
90<body> 94<body>
91 95
92<p> 96<p>
93The next step is to set the <i>LANG</i> shell variable, which 97The next step is to set the <c>LANG</c> shell variable, which
94is used by your shell and window manager (and some other 98is used by your shell and window manager (and some other
95applications). Valid values can be found in 99applications). Valid values can be found in
96<path>/usr/share/locale</path> and generally take the form 100<path>/usr/share/locale</path> and generally take the form
97<i>ab_CD</i>, where <i>ab</i> is your two letter language code 101<c>ab_CD</c>, where <c>ab</c> is your two letter language code
98and <i>CD</i> is your two letter country code. The <i>_CD</i> 102and <c>CD</c> is your two letter country code. The <c>_CD</c>
99is left off if your language is only (or primarily) spoken in 103is left off if your language is only (or primarily) spoken in
100one country. <i>LANG</i> can be set in 104one country. <c>LANG</c> can be set in
101<path>/etc/profile</path> if you want it to take effect 105<path>/etc/profile</path> if you want it to take effect
102system-wide, or in <path>~/.bashrc</path> as a user-specific 106system-wide, or in <path>~/.bashrc</path> as a user-specific
103setting. 107setting.
104</p> 108</p>
105 109
106<pre caption="setting the POSIX locale"> 110<pre caption="setting the POSIX locale">
107export LANG="de_DE@euro" 111export LANG="de_DE@euro"
108</pre> 112</pre>
109 113
110<note> 114<note>
111Appended <i>@euro</i> to your locale if you want to use the new Euro 115Appended <c>@euro</c> to your locale if you want to use the new Euro
112currency symbol (&#8364;) 116currency symbol (&#8364;)
113</note> 117</note>
114 118
115</body> 119</body>
116</section> 120</section>
121<section>
122<title>Generating Specific Locales</title>
123<body>
124
125<p>
126If you use a locale that isn't available by default, you should use
127<c>localedef</c> to generate your locale. For instance:
128</p>
129
130<pre caption="Generating a locale using localedef">
131# <i>localedef -c -i en_US -f ISO-8859-15 en_US.ISO-8859-15</i>
132</pre>
133
134<p>
135After having generated the locale, you can export the LANG variable as you see
136fit.
137</p>
138
139<pre caption="Exporting the LANG variable">
140# <i>export LANG="en_US.ISO-8859-15"</i>
141</pre>
142
143</body>
144</section>
145<section>
146<title>The userlocales USE flag</title>
147<body>
148
149<p>
150You will probably only use one or maybe two locales on your system. Up until now
151after compiling <c>glibc</c> a full set of all available locales has been
152created. As of now you can activate the <c>userlocales</c> USE flag und specify
153only the locales you will need in <path>/etc/locales.build</path>.
154</p>
155
156<pre caption="Activate the userlocales USE flag especially for glibc">
157echo "sys-libs/glibc userlocales" >> /etc/portage/package.use
158</pre>
159
160<p>
161Now specify the locales you want to be able to use:
162</p>
163
164<pre caption="nano -w /etc/locales.build">
165en_US/ISO-8859-1
166en_US.UTF-8/UTF-8
167de_DE/ISO-8859-1
168de_DE@euro/ISO-8859-15
169</pre>
170
171<p>
172The next step is to re-compile <c>glibc</c>. Of course you can defer this until
173the next <c>glibc</c> upgrade is available.
174</p>
175
176</body>
177</section>
117</chapter> 178</chapter>
118 179
119<chapter> 180<chapter>
120<title>Keyboard layout for the console</title> 181<title>Keyboard layout for the console</title>
121<section> 182<section>
122<body> 183<body>
123 184
124<p> 185<p>
125The keyboard layout used by the console is set in 186The keyboard layout used by the console is set in
126<path>/etc/rc.conf</path> by the <i>KEYMAP</i> variable. 187<path>/etc/rc.conf</path> by the <c>KEYMAP</c> variable.
127Valid values can be found in 188Valid values can be found in
128<path>/usr/share/keymaps/<i>{arch}</i>/</path>. 189<path>/usr/share/keymaps/<c>{arch}</c>/</path>.
129<path>i386</path> has further subdivisions into layout 190<path>i386</path> has further subdivisions into layout
130(<path>qwerty/</path>, <path>azerty/</path>, etc.). Some 191(<path>qwerty/</path>, <path>azerty/</path>, etc.). Some
131languages have multiple options, so you may wish to experiment 192languages have multiple options, so you may wish to experiment
132to decide which one fits your needs best. 193to decide which one fits your needs best.
133</p> 194</p>
147<section> 208<section>
148<body> 209<body>
149 210
150<p> 211<p>
151The keyboard layout to be used by the X server is specified 212The keyboard layout to be used by the X server is specified
152in <path>/etc/X11/XF86Config</path> by the <i>XkbLayout</i> 213in <path>/etc/X11/XF86Config</path> by the <c>XkbLayout</c>
153option. 214option.
154</p> 215</p>
155 216
156<pre caption="setting the X keymap"> 217<pre caption="setting the X keymap">
157 Section "InputDevice" 218 Section "InputDevice"
188<section> 249<section>
189<body> 250<body>
190 251
191<p> 252<p>
192In order to get your console to display the Euro symbol, you 253In order to get your console to display the Euro symbol, you
193will need to set <i>CONSOLEFONT</i> in 254will need to set <c>CONSOLEFONT</c> in
194<path>/etc/rc.conf</path> to a file found in 255<path>/etc/rc.conf</path> to a file found in
195<path>/usr/share/consolefonts/</path> (without the 256<path>/usr/share/consolefonts/</path> (without the
196<c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol. 257<c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol.
197</p> 258</p>
198 259
210<title>Most Applications</title> 271<title>Most Applications</title>
211<body> 272<body>
212 273
213<p> 274<p>
214Getting the Euro symbol to work properly in X is a little 275Getting the Euro symbol to work properly in X is a little
215bit tougher. The first thing you should do is change the <i> 276bit tougher. The first thing you should do is change the <c>fixed</c>
216fixed</i> and <i>variable</i> definitions in 277and <c>variable</c> definitions in
217<path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end 278<path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end
218in <i>iso8859-15</i> instead of <i>iso8859-1</i>. 279in <c>iso8859-15</c> instead of <c>iso8859-1</c>.
219</p> 280</p>
220 281
221<pre caption="setting default X fonts"> 282<pre caption="setting default X fonts">
222fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15 283fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
223variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15 284variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20