/[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.31 Revision 1.32
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.31 2005/08/21 22:44:26 neysx Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.32 2005/09/24 13:06:18 flammie 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">
8 Alexander Holler 8 Alexander Holler
9</author> 9</author>
10<author title="Translator/Editor"> 10<author title="Translator/Editor">
11 <mail link="slucy@uchicago.edu">Steven Lucy</mail> 11 <mail link="slucy@uchicago.edu">Steven Lucy</mail>
12</author> 12</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> 18</author>
19<author title="Editor"> 19<author title="Editor">
20 <mail link="dertobi123@gentoo.org">Tobias Scherbaum</mail> 20 <mail link="dertobi123@gentoo.org">Tobias Scherbaum</mail>
21</author> 21</author>
22<author title="Editor"> 22<author title="Editor">
23 <mail link="flammie@gentoo.org">Flammie Pirinen</mail> 23 <mail link="flammie@gentoo.org">Flammie Pirinen</mail>
24</author> 24</author>
25 25
26<abstract> 26<abstract>
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.22</version> 32<version>1.23</version>
33<date>2005-08-22</date> 33<date>2005-09-24</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>
39 39
40<p> 40<p>
41In order to keep time properly, <path>/etc/localtime</path> must point to the 41In order to keep time properly, <path>/etc/localtime</path> must point to the
42correct time zone data file. Look around in <path>/usr/share/zoneinfo/</path> 42correct time zone data file. Look around in <path>/usr/share/zoneinfo/</path>
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">
98<title>What are locales?</title> 98<title>What are locales?</title>
99<body> 99<body>
100 100
101<p> 101<p>
102A Locale is a set of information that most programs use for determining 102A Locale is a set of information that most programs use for determining
103country and language specific settings. The locales and their data 103country and language specific settings. The locales and their data
104are part of the system library and can be found 104are part of the system library and can be found
105at <path>/usr/share/locale</path> on most systems. A locale name is generally 105at <path>/usr/share/locale</path> on most systems. A locale name is generally
106named <c>ab_CD</c> where <c>ab</c> is your two (or three) letter 106named <c>ab_CD</c> where <c>ab</c> is your two (or three) letter
107language code (as specified in ISO-639) and <c>CD</c> is your two letter country 107language code (as specified in ISO-639) and <c>CD</c> is your two letter country
108code (as specified in ISO-3199). 108code (as specified in ISO-3199).
109</p> 109</p>
110 110
111</body> 111</body>
112</section> 112</section>
113<section> 113<section id="variables">
114<title>Environment variables for locales</title> 114<title>Environment variables for locales</title>
115<body> 115<body>
116 116
117<p> 117<p>
118Locale settings are stored in environment variables. These are typically 118Locale settings are stored in environment variables. These are typically
119set in the <path>/etc/env.d/02locale</path> (for system-wide 119set in the <path>/etc/env.d/02locale</path> (for system-wide
120settings) and <path>~/.bashrc</path> (for user-specific settings) file. 120settings) and <path>~/.bashrc</path> (for user-specific settings) file.
121The variables controlling different aspects of locale settings 121The variables controlling different aspects of locale settings
122are given in the table below, those with highest precedence (ie. those 122are given in the table below, those with highest precedence (ie. those
123that override settings below them) are at the top of the table. All variables 123that override settings below them) are at the top of the table. All variables
124take one name of a locale in <c>ab_CD</c> format given above. 124take one name of a locale in <c>ab_CD</c> format given above.
125</p> 125</p>
126 126
127<table> 127<table>
128<tr> 128<tr>
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 (&#8364;)
208</note> 208</note>
209 209
210<p> 210<p>
211For message based localization to work in programs that support it, you will 211For 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 212probably 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 213support) 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 214library to extract and use localized messages. Of course, Gentoo's Portage will
215automatically install it when needed. 215automatically install it when needed.
216</p> 216</p>
217
218<p>
219There is also additional localisation variable called LINGUAS, which affects
220to localisation files that get installed in gettext-based programs, and decides
221used localisation for some specific software packages, such as
222<c>kde-base/kde-i18n</c> and <c>app-office/openoffice</c>. The variable
223takes in <e>space</e>-separated list of language codes, and suggested
224place to set it is <path>/etc/make.conf</path>:
225</p>
226
227<pre caption="setting LINGUAS in make.conf">
228# <i>nano -w /etc/make.conf</i>
229<comment>(Add in the LINGUAS variable. For instance,
230for German, Finnish and English:)</comment>
231LINGUAS="de fi en"
232</pre>
233
217 234
218</body> 235</body>
219</section> 236</section>
220<section> 237<section>
221<title>Generating Specific Locales</title> 238<title>Generating Specific Locales</title>
222<body> 239<body>
223 240
224<p> 241<p>
225If you use a locale that isn't available by default, you should use 242If you use a locale that isn't available by default, you should use
226<c>localedef</c> to generate your locale. For instance: 243<c>localedef</c> to generate your locale. For instance:
227</p> 244</p>
228 245
229<pre caption="Generating a locale using localedef"> 246<pre caption="Generating a locale using localedef">
230# <i>localedef -c -i en_US -f ISO-8859-15 en_US.ISO-8859-15</i> 247# <i>localedef -c -i en_US -f ISO-8859-15 en_US.ISO-8859-15</i>
231</pre> 248</pre>
320 Option "XkbLayout" "de" 337 Option "XkbLayout" "de"
321 # Option "XkbVariant" "nodeadkeys" 338 # Option "XkbVariant" "nodeadkeys"
322 ... 339 ...
323</pre> 340</pre>
324 341
325</body> 342</body>
326</section> 343</section>
327</chapter> 344</chapter>
328 345
329<chapter> 346<chapter>
330<title>KDE</title> 347<title>KDE</title>
331<section> 348<section>
332<body> 349<body>
333 350
334<p> 351<p>
335For KDE you have to install the kde-i18n package with the appropriate 352For KDE you have to install the <c>kde-base/kde-i18n</c> package. Kde-i18n
336LINGUAS variable set: 353respects <uri link="#variables">LINGUAS variable</uri> described earlier.
337</p>
338
339<pre caption="Install localized KDE">
340# <i>nano -w /etc/make.conf</i>
341<comment>(Add in the LINGUAS variable. For instance, for the German language:)</comment>
342LINGUAS="de"
343
344<comment>(Now install kde-i18n)</comment>
345# <i>emerge kde-i18n</i>
346</pre> 354</p>
347 355
348</body> 356</body>
349</section> 357</section>
350</chapter> 358</chapter>
351 359
352<chapter> 360<chapter>
353<title>The Euro Symbol for the Console</title> 361<title>The Euro Symbol for the Console</title>
354<section> 362<section>
355<body> 363<body>
356 364
357<p> 365<p>
358In order to get your console to display the Euro symbol, you 366In order to get your console to display the Euro symbol, you
359will need to set <c>CONSOLEFONT</c> in 367will need to set <c>CONSOLEFONT</c> in
360<path>/etc/rc.conf</path> to a file found in 368<path>/etc/rc.conf</path> to a file found in
361<path>/usr/share/consolefonts/</path> (without the 369<path>/usr/share/consolefonts/</path> (without the
427For XEmacs (not plain Emacs), you have to do a little 435For XEmacs (not plain Emacs), you have to do a little
428more. In <path>/home/user/.xemacs/init.el</path>, add: 436more. In <path>/home/user/.xemacs/init.el</path>, add:
429</p> 437</p>
430 438
431<pre caption="setting the font for xemacs"> 439<pre caption="setting the font for xemacs">
432(define-key global-map '(EuroSign) '[&#8364;]) 440(define-key global-map '(EuroSign) '[&#8364;])
433</pre> 441</pre>
434 442
435<note> 443<note>
436The symbol in the []s is the Euro symbol. 444The symbol in the []s is the Euro symbol.
437</note> 445</note>
438 446
439</body> 447</body>
440</section> 448</section>
441<section> 449<section>
442<title>Language for OpenOffice.org</title> 450<title>OpenOffice.Org</title>
443<body> 451<body>
444 452
445<note>
446Customized default language is not available for openoffice-bin ebuild. The
447default language in the openoffice-bin is ENUS.
448</note>
449
450<p>
451Please note that this package now uses the LINGUAS variable to
452provide localization. The old LANGUAGE=ENUS|PORT system does <e>not</e> work
453anymore. The default language for OpenOffice.org is set as "US English". If you
454wish to change the default language for OpenOffice.org, check the ebuild for the
455default language code.
456</p> 453<p>
457 454The current <c>app-office/openoffice</c> (or <c>-ximian</c>) source ebuilds
458<pre caption="Example: emerge openoffice for german + english environment"> 455support <uri link="#variables">LINGUAS variable</uri> for selecting installed
459# <i>nano -w /etc/make.conf</i> 456GUI language packs. The current <e>stable</e>
460<comment>(Add in the LINGUAS variable. For instance, for the German and English language:)</comment> 457<c>app-office/openoffice-bin</c> binary ebuilds do <e>not</e> yet
461LINGUAS="de en" 458support LINGUAS variable, however, so in order to use localised OpenOffice.Org
462 459you must either install the source version, or, with your discretion, the
463<comment>(Now install openoffice)</comment> 460unstable binary version. To see status of GUI translation,
464# <i>emerge openoffice</i> 461hyphenation, spell checking and other localisations on your language, please
462refer to
463<uri link="http://l10n.openoffice.org/languages.html">OpenOffice.Org
464localisation web site</uri>.
465</pre> 465</p>
466 466
467</body> 467</body>
468</section> 468</section>
469</chapter> 469</chapter>
470 470
471</guide> 471</guide>

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20