<?xml version='1.0'?>
<?xml-stylesheet href="guide-main.xsl" type="text/xsl"?>
	    
<guide>
<title>Gentoo Linux Localization Guide</title>
<author title="Author"><mail link="holler@ahsoftware.de">
        Alexander Holler</mail>
</author>
<author title="Translator/Editor"><mail link="slucy@uchicago.edu">
	Steven Lucy</mail>
</author>

<abstract>
This guide should help users localize their Gentoo Linux distribution to any
European locale.  It uses Germany as a case-study, since it is translated from
the German doc.  Includes configuration for use of the Euro currency symbol.
</abstract>

<chapter>
<title>Timezone</title>
<section>
        <body>
                <p>In order to keep time properly,
		<path>/etc/localtime</path> must point to the correct time zone
		data file.  Look around in <path>/usr/share/zoneinfo/</path>
		and pick your timezone or a near-by big city.
<pre caption="setting the timezone">
# <i>ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i>
# <i>date</i>
Sun Feb 16 08:26:44 CET 2003
</pre>
<note>Make sure that the three-letter timezone indicator (in this case "CET")
is correct for your area.</note>
<note>You can set the value of <i>TZ</i> to be everything after the
<path>/usr/share/zoninfo</path> in your shell rc file
(<path>.bash_profile</path> for bash) for a user-level setting.  In this case
<i>TZ="Europe/Berlin"</i>.</note>
		</p>
        </body>
</section>
</chapter>

<chapter>
<title>System Clock</title>
<section>
        <body>
                <p>
		In most Gentoo Linux installations, your system clock is set to
		UTC (or GMT, Greenwhich Mean Time) and then your timezone is
		taken into account to determine the actual, local time.  If,
		for some reason, you need your system clock not to be in UTC,
		you will need to edit <path>/etc/rc.conf</path> and change the
		value of <i>CLOCK</i>.

<pre caption="local vs. GMT clock">
 <codenote>recommended:</codenote>
 CLOCK="UTC"
 <codenote>or:</codenote>
 CLOCK="local"
</pre>
		</p>
        </body>
</section>
</chapter>

<chapter>
<title>POSIX Locale</title>
<section>
        <body>
                <p>
		The next step is to set the <i>LANG</i> shell variable, which
		is used by your shell and window manager (and some other
		applications).  Valid values can be found in
		<path>/usr/share/locale</path> and generally take the form
		<i>ab_CD</i>, where <i>ab</i> is your two letter language code
		and <i>CD</i> is your two letter country code.  the <i>_CD</i>
		is left off if your language is only (or primarily) spoken in
		one country.  <i>LANG</i> can be set in
		<path>/etc/profile</path> if you want it to take effect
		system-wide, or in <path>~/.bashrc</path> as a user-specific
		setting.
<pre caption="setting the POSIX locale">
 export LANG="de_DE@euro"
</pre>
<note>Appended <i>@euro</i> to your locale if you want to use the new Euro
currency symbol (&#8364;)</note>
		</p>
        </body>
</section>
</chapter>

<chapter>
<title>Keyboard layout for the console</title>
<section>
        <body>
                <p>
		The keyboard layoud used by the console is set in
		<path>/etc/rc.conf</path> by the <i>KEYMAP</i> variable.
		Valid values can be found in
		<path>/usr/share/keymaps/<i>{arch}</i>/</path>.
		<path>i386</path> has further subdivisions into layout
		(<path>qwerty/</path>, <path>azerty/</path>, etc.).  Some
		languages have multiple options, so you may wish to experiment
		to decide which one fits your needs best.
<pre caption="setting the console keymap">
 KEYMAP="de"
 KEYMAP="de-latin1"
 KEYMAP="de-latin1-nodeadkeys"
</pre>
		</p>
        </body>
</section>
</chapter>

<chapter>
<title>Keyboard layout for the X server</title>
<section>
        <body>
                <p>The keyboard layout to be used by the X server is specified
		in <path>/etc/X11/XF86Config</path> by the <i>XkbLayout</i>
		option.
<pre caption="setting the X keymap">
 Section "InputDevice"
     Identifier  "Keyboard1"
     ...
     Option "XkbLayout"    "de"
     # Option XkbVariant"  "nodeadkeys"
     ...
</pre>
		</p>
        </body>
</section>
</chapter>

<chapter>
<title>The Euro Symbol for the Console</title>
<section>
        <body>
                <p>
		In order to get your console to display the Euro symbol, you
		will need to set <i>CONSOLEFONT</i> in
		<path>/etc/rc.conf</path> to a file found in
		<path>/usr/share/consolefonts/</path> (without the
		<c>.psfu.gz</c>).  <c>lat0-16</c> has the Euro symbol.
<pre caption="setting the console font">
 CONSOLEFONT="lat0-16"
</pre>
		</p>
        </body>
</section>
</chapter>

<chapter>
        <title>The Euro Symbol in X</title>
<section>
        <title>Most Applications</title>
        <body>
                <p>Getting the Euro symbol to work properly in X is a little
		bit tougher.  The first thing you should do is change the <i>
		fixed</i> and <i>variable</i> definitions in
		<path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end
		in <i>iso8859-15</i> instead of <i>iso8859-1</i>.
<pre caption="setting default X fonts">
 fixed        -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15
 variable     -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15
</pre>
		</p>
		<p>Some applications use their own font, and you will have to
		tell them separately to use a font with the Euro symbol.  You
		can do this at a user-specific level in
		<path>.Xdefaults</path> (you can copy this file to
		<path>/etc/skel/</path> for use by new users), or at a global
		level for any application with a resource file in
		<path>/usr/X11R6/lib/X11/app-defaults/</path> (like xterm).  In
		these files you generally have to change an existing line,
		rather than adding a new one.  To change our xterm font, for
		instance:
<pre caption="setting fonts for xterm">
 <codenote>(in your home directory)</codenote>
 $ <i>echo 'XTerm*font: fixed' >> .Xresources </i>
 $ <i>xrdb -merge .Xresources</i>
</pre>
		</p>
        </body>
</section>

<section>
        <title>The Euro symbol in (X)Emacs</title>
        <body>
                <p>To use the Euro symbol in (X)Emacs, add the following to
		<path>.Xdefaults</path>:
<pre caption="setting the font for emacs">
 Emacs.default.attributeFont: -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-15
</pre>
		</p><p>For XEmacs (not plain Emacs), you have to do a little
		more.  In <path>/home/user/.xemacs/init.el</path>, add:
<pre caption="setting the font for xemacs">
 (define-key global-map '(EuroSign) '[&#8364;])
</pre>
		<note>The symbol in the []s is the Euro symbol.</note>
		</p>
        </body>
</section>

</chapter>

<version>$Revision: 1.4 $</version>
<date>$Date: 2003/03/03 03:42:08 $</date>
</guide>
