/[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.55 Revision 1.56
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.55 2009/06/14 09:16:34 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.56 2009/06/15 19:59:58 nightmorph 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>
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<author title="Editor"> 25<author title="Editor">
26 <mail link="nightmorph"/> 26 <mail link="nightmorph"/>
27</author> 27</author>
28 28
29<abstract> 29<abstract>
30This guide should help users localize their Gentoo Linux distribution to any 30This guide should help users localize their Gentoo Linux distribution to any
31European locale. It uses Germany as a case-study, since it is translated from 31European locale. It uses Germany as a case-study, since it is translated from
32the German doc. Includes configuration for use of the euro currency symbol. 32the German doc. Includes configuration for use of the euro currency symbol.
33</abstract> 33</abstract>
34 34
35<version>1.41</version> 35<version>1.42</version>
36<date>2009-06-14</date> 36<date>2009-06-15</date>
37 37
38<chapter> 38<chapter>
39<title>Time zone</title> 39<title>Time zone</title>
40<section> 40<section>
41<body> 41<body>
42 42
43<p> 43<p>
44In order to keep time properly, you need to select your timezone so that your 44In order to keep time properly, you need to select your timezone so that your
45system knows where it is located. Look for your timezone in 45system knows where it is located. Look for your timezone in
46<path>/usr/share/zoneinfo</path>. You then set your timezone in 46<path>/usr/share/zoneinfo</path>. You then set your timezone in
47<path>/etc/conf.d/clock</path>. Please avoid the 47<path>/etc/conf.d/clock</path>. Please avoid the
48<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not 48<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
49indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. 49indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8.
50</p> 50</p>
51 51
204a different ordering. Therefore it's recommended to explicitly set LC_COLLATE to C 204a different ordering. Therefore it's recommended to explicitly set LC_COLLATE to C
205when dealing with system-wide settings. 205when dealing with system-wide settings.
206</note> 206</note>
207 207
208<warn> 208<warn>
209Using LC_ALL is strongly discouraged as it can't be overridden later on. Please 209Using LC_ALL is strongly discouraged as it can't be overridden later on. Please
210use it only when testing and <e>never</e> set it in a startup file. 210use it only when testing and <e>never</e> set it in a startup file.
211</warn> 211</warn>
212 212
213<p> 213<p>
214Most typically users only set the LANG variable on the global basis. This 214Most typically users only set the LANG variable on the global basis. This
215example is for a unicode German locale: 215example is for a unicode German locale:
216</p> 216</p>
217 217
218<pre caption="Setting the default system locale in /etc/env.d/02locale"> 218<pre caption="Setting the default system locale in /etc/env.d/02locale">
219LANG="de_DE.UTF-8 UTF-8" 219LANG="de_DE.UTF-8"
220LC_COLLATE="C" 220LC_COLLATE="C"
221</pre> 221</pre>
222 222
223<note> 223<note>
224Use <c>de_DE@euro ISO-8859-15</c> as your LANG if you want to use the Euro 224Use <c>de_DE@euro ISO-8859-15</c> as your LANG if you want to use the Euro
225currency symbol (€) 225currency symbol (€).
226</note> 226</note>
227 227
228<p> 228<p>
229It's also possible, and pretty common especially in a more traditional UNIX 229It's also possible, and pretty common especially in a more traditional UNIX
230environment, to leave the global settings unchanged, i.e. in the "<c>C</c>" 230environment, to leave the global settings unchanged, i.e. in the "<c>C</c>"
231locale. Users can still specify their preferred locale in their own shell RC 231locale. Users can still specify their preferred locale in their own shell RC
232file: 232file:
233</p> 233</p>
234 234
235<pre caption="Setting the user locale in ~/.bashrc"> 235<pre caption="Setting the user locale in ~/.bashrc">
236export LANG="de_DE.UTF-8 UTF-8" 236export LANG="de_DE.UTF-8"
237export LC_COLLATE="C" 237export LC_COLLATE="C"
238</pre> 238</pre>
239 239
240<p> 240<p>
241Another way of configuring system is to leave it in the default C locale, but 241Another way of configuring system is to leave it in the default C locale, but
242enable UTF-8 character representation at the same time. This option is achieved 242enable UTF-8 character representation at the same time. This option is achieved
243using the following settings in <path>/etc/env.d/02locale</path>: 243using the following settings in <path>/etc/env.d/02locale</path>:
244</p> 244</p>
245 245
246<pre caption="Using traditional C locale while specifying UTF-8"> 246<pre caption="Using traditional C locale while specifying UTF-8">
247LC_CTYPE=de_DE.UTF-8 UTF-8 247LC_CTYPE=de_DE.UTF-8
248</pre> 248</pre>
249 249
250<p> 250<p>
251Using the above snippet, users will be able to see localized file names 251Using the above snippet, users will be able to see localized file names
252properly, while not being forced to your preferred language. 252properly, while not being forced to your preferred language.
253</p> 253</p>
254 254
255<p> 255<p>
256For message based localization to work in programs that support it, you will 256For message based localization to work in programs that support it, you will
257probably need to have programs compiled with the <c>nls</c> (Native language 257probably need to have programs compiled with the <c>nls</c> (Native language
258support) USE flag set. Most of the programs using nls also need the gettext 258support) USE flag set. Most of the programs using nls also need the gettext
259library to extract and use localized messages. Of course, Portage will 259library to extract and use localized messages. Of course, Portage will
260automatically install it when needed. 260automatically install it when needed.
261</p> 261</p>
262 262

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

  ViewVC Help
Powered by ViewVC 1.1.20