/[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.38 Revision 1.39
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.38 2006/05/15 12:32:31 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.39 2006/05/25 16:22:37 neysx 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">
27This guide should help users localize their Gentoo Linux distribution to any 27This guide should help users localize their Gentoo Linux distribution to any
28European locale. It uses Germany as a case-study, since it is translated from 28European locale. It uses Germany as a case-study, since it is translated from
29the German doc. Includes configuration for use of the euro currency symbol. 29the German doc. Includes configuration for use of the euro currency symbol.
30</abstract> 30</abstract>
31 31
32<version>1.28</version> 32<version>1.29</version>
33<date>2006-05-15</date> 33<date>2006-05-25</date>
34 34
35<chapter> 35<chapter>
36<title>Time zone</title> 36<title>Time zone</title>
37<section> 37<section>
38<body> 38<body>
43and pick your timezone or a near-by big city. Please avoid the 43and pick your timezone or a near-by big city. Please avoid the
44<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not 44<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
45indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. 45indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8.
46</p> 46</p>
47 47
48<pre caption="setting the timezone"> 48<pre caption="Setting the timezone">
49# <i>cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i> 49# <i>cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i>
50# <i>date</i> 50# <i>date</i>
51Sun Feb 16 08:26:44 CET 2003 51Sun Feb 16 08:26:44 CET 2003
52</pre> 52</pre>
53 53
196Most typically users only set the LANG variable and perhaps LC_CTYPE variable 196Most typically users only set the LANG variable and perhaps LC_CTYPE variable
197on user level by adding definitions to shells startup files defining 197on user level by adding definitions to shells startup files defining
198the environment variable manually from command line: 198the environment variable manually from command line:
199</p> 199</p>
200 200
201<pre caption="setting the German locale"> 201<pre caption="Setting the user locale in ~/.bashrc">
202export LANG="de_DE@euro" 202export LANG="de_DE@euro"
203</pre> 203</pre>
204 204
205<note> 205<note>
206Append <c>@euro</c> to your locale if you want to use the Euro 206Append <c>@euro</c> to your locale if you want to use the Euro
207currency symbol (&#8364;) 207currency symbol ()
208</note> 208</note>
209
210<p>
211It is also possible to set a system-wide locale for all users and programs:
212</p>
213
214<pre caption="Setting the default system locale in /etc/env.d/02locale">
215LC_ALL="de_DE@euro"
216LANG="de_DE@euro"
217</pre>
218
219<p>
220A common practice is to use only per user locale settings and leave the
221default system locale unset. In this case system locale defaults to a
222special value <c>"C"</c>, which for historical reasons maps to the English
223locale.
224</p>
209 225
210<p> 226<p>
211For message based localization to work in programs that support it, you will 227For message based localization to work in programs that support it, you will
212probably need to have programs compiled with the <c>nls</c> (Native language 228probably need to have programs compiled with the <c>nls</c> (Native language
213support) USE flag set. Most of the programs using nls also need the gettext 229support) USE flag set. Most of the programs using nls also need the gettext
214library to extract and use localized messages. Of course, Gentoo's Portage will 230library to extract and use localized messages. Of course, Portage will
215automatically install it when needed. 231automatically install it when needed.
216</p> 232</p>
217 233
218<p> 234<p>
219Once you have set the right locale, be sure to update your environment 235Once you have set the right locale, be sure to update your environment
220variables to make your system aware of the change: 236variables to make your system aware of the change:
221</p> 237</p>
222 238
223<pre caption="Update the environment"> 239<pre caption="Update the environment">
240<comment>(For system-wide default locale:)</comment>
224# <i>env-update &amp;&amp; source /etc/profile</i> 241# <i>env-update &amp;&amp; source /etc/profile</i>
242
243<comment>(For user-specific locale:</comment>
244$ <i>source ~/.bashrc</i>
225</pre> 245</pre>
226 246
227<p> 247<p>
228After this, you will need to kill your X server by pressing 248After this, you will need to kill your X server by pressing
229<c>Ctrl-Alt-Backspace</c>, log out, then log in as user. 249<c>Ctrl-Alt-Backspace</c>, log out, then log in as user.
244<c>kde-base/kde-i18n</c> and <c>app-office/openoffice</c>. The variable 264<c>kde-base/kde-i18n</c> and <c>app-office/openoffice</c>. The variable
245takes in <e>space</e>-separated list of language codes, and suggested 265takes in <e>space</e>-separated list of language codes, and suggested
246place to set it is <path>/etc/make.conf</path>: 266place to set it is <path>/etc/make.conf</path>:
247</p> 267</p>
248 268
249<pre caption="setting LINGUAS in make.conf"> 269<pre caption="Setting LINGUAS in make.conf">
250# <i>nano -w /etc/make.conf</i> 270# <i>nano -w /etc/make.conf</i>
251<comment>(Add in the LINGUAS variable. For instance, 271<comment>(Add in the LINGUAS variable. For instance,
252for German, Finnish and English:)</comment> 272for German, Finnish and English:)</comment>
253LINGUAS="de fi en" 273LINGUAS="de fi en"
254</pre> 274</pre>
342(<path>qwerty/</path>, <path>azerty/</path>, etc.). Some 362(<path>qwerty/</path>, <path>azerty/</path>, etc.). Some
343languages have multiple options, so you may wish to experiment 363languages have multiple options, so you may wish to experiment
344to decide which one fits your needs best. 364to decide which one fits your needs best.
345</p> 365</p>
346 366
347<pre caption="setting the console keymap"> 367<pre caption="Setting the console keymap">
348KEYMAP="de" 368KEYMAP="de"
349KEYMAP="de-latin1" 369KEYMAP="de-latin1"
350KEYMAP="de-latin1-nodeadkeys" 370KEYMAP="de-latin1-nodeadkeys"
351</pre> 371</pre>
352 372
363The keyboard layout to be used by the X server is specified 383The keyboard layout to be used by the X server is specified
364in <path>/etc/X11/xorg.conf</path> by the <c>XkbLayout</c> 384in <path>/etc/X11/xorg.conf</path> by the <c>XkbLayout</c>
365option. 385option.
366</p> 386</p>
367 387
368<pre caption="setting the X keymap"> 388<pre caption="Setting the X keymap">
369 Section "InputDevice" 389 Section "InputDevice"
370 Identifier "Keyboard1" 390 Identifier "Keyboard1"
371 ... 391 ...
372 Option "XkbLayout" "de" 392 Option "XkbLayout" "de"
373 #Option "XkbModel" "pc105" <comment>## this is for international keyboards.</comment> 393 #Option "XkbModel" "pc105" <comment>## this is for international keyboards.</comment>
439<path>/etc/conf.d/consolefont</path> to a file found in 459<path>/etc/conf.d/consolefont</path> to a file found in
440<path>/usr/share/consolefonts/</path> (without the 460<path>/usr/share/consolefonts/</path> (without the
441<c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol. 461<c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol.
442</p> 462</p>
443 463
444<pre caption="setting the console font"> 464<pre caption="Setting the console font">
445CONSOLEFONT="lat9w-16" 465CONSOLEFONT="lat9w-16"
446</pre> 466</pre>
447 467
448<p> 468<p>
449You should verify that <c>CONSOLEFONT</c> is in the boot runlevel: 469You should verify that <c>CONSOLEFONT</c> is in the boot runlevel:
477and <c>variable</c> definitions in 497and <c>variable</c> definitions in
478<path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end 498<path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end
479in <c>iso8859-15</c> instead of <c>iso8859-1</c>. 499in <c>iso8859-15</c> instead of <c>iso8859-1</c>.
480</p> 500</p>
481 501
482<pre caption="setting default X fonts"> 502<pre caption="Setting default X fonts">
483fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15 503fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
484variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15 504variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15
485</pre> 505</pre>
486 506
487<p> 507<p>
495these files you generally have to change an existing line, 515these files you generally have to change an existing line,
496rather than adding a new one. To change our xterm font, for 516rather than adding a new one. To change our xterm font, for
497instance: 517instance:
498</p> 518</p>
499 519
500<pre caption="setting fonts for xterm"> 520<pre caption="Setting fonts for xterm">
501<comment>(in your home directory)</comment> 521<comment>(in your home directory)</comment>
502$ <i>echo 'XTerm*font: fixed' >> .Xresources </i> 522$ <i>echo 'XTerm*font: fixed' >> .Xresources </i>
503$ <i>xrdb -merge .Xresources</i> 523$ <i>xrdb -merge .Xresources</i>
504</pre> 524</pre>
505 525
522For XEmacs (not plain Emacs), you have to do a little 542For XEmacs (not plain Emacs), you have to do a little
523more. In <path>/home/user/.xemacs/init.el</path>, add: 543more. In <path>/home/user/.xemacs/init.el</path>, add:
524</p> 544</p>
525 545
526<pre caption="setting the font for xemacs"> 546<pre caption="setting the font for xemacs">
527(define-key global-map '(EuroSign) '[&#8364;]) 547(define-key global-map '(EuroSign) '[])
528</pre> 548</pre>
529 549
530<note> 550<note>
531The symbol in the []s is the Euro symbol. 551The symbol in the []s is the Euro symbol.
532</note> 552</note>

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.20