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.33 2005/11/25 20:36:01 jkt Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/guide-localization.xml,v 1.50 2008/11/30 11:28:59 jkt 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"> |
… | |
… | |
27 | This guide should help users localize their Gentoo Linux distribution to any |
27 | This guide should help users localize their Gentoo Linux distribution to any |
28 | European locale. It uses Germany as a case-study, since it is translated from |
28 | European locale. It uses Germany as a case-study, since it is translated from |
29 | the German doc. Includes configuration for use of the euro currency symbol. |
29 | the German doc. Includes configuration for use of the euro currency symbol. |
30 | </abstract> |
30 | </abstract> |
31 | |
31 | |
32 | <version>1.24</version> |
32 | <version>1.38</version> |
33 | <date>2005-11-25</date> |
33 | <date>2008-11-30</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> |
41 | In order to keep time properly, <path>/etc/localtime</path> must contain the |
41 | In order to keep time properly, you need to select your timezone so that your |
42 | correct time zone data file. Look around in <path>/usr/share/zoneinfo/</path> |
42 | system knows where it is located. Look for your timezone in |
43 | and pick your timezone or a near-by big city. Please avoid the |
43 | <path>/usr/share/zoneinfo</path>. You then set your timezone in |
|
|
44 | <path>/etc/conf.d/clock</path>. Please avoid the |
44 | <path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
45 | <path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
45 | indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. |
46 | indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. |
46 | </p> |
47 | </p> |
47 | |
48 | |
48 | <pre caption="setting the timezone"> |
49 | <pre caption="Setting the timezone information"> |
49 | # <i>cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime</i> |
50 | # <i>ls /usr/share/zoneinfo</i> |
|
|
51 | <comment>(Suppose you want to use Brussels)</comment> |
|
|
52 | # <i>nano -w /etc/conf.d/clock</i> |
|
|
53 | TIMEZONE="Europe/Brussels" |
|
|
54 | |
50 | # <i>date</i> |
55 | # <i>date</i> |
51 | Sun Feb 16 08:26:44 CET 2003 |
56 | Wed Mar 8 00:46:05 CET 2006 |
52 | </pre> |
57 | </pre> |
53 | |
58 | |
54 | <note> |
59 | <note> |
55 | Make sure that the three-letter timezone indicator (in this case "CET") |
60 | Make sure that the timezone indicator (in this case "CET") |
56 | is correct for your area. |
61 | is correct for your area. |
57 | </note> |
62 | </note> |
58 | |
63 | |
59 | <note> |
64 | <note> |
60 | You can set the value of <c>TZ</c> to be everything after the |
65 | You can set the value of <c>TZ</c> to be everything after the |
… | |
… | |
97 | <section> |
102 | <section> |
98 | <title>What are locales?</title> |
103 | <title>What are locales?</title> |
99 | <body> |
104 | <body> |
100 | |
105 | |
101 | <p> |
106 | <p> |
102 | A Locale is a set of information that most programs use for determining |
107 | A Locale is a set of information that most programs use for determining country |
103 | country and language specific settings. The locales and their data |
108 | and language specific settings. The locales and their data are part of the |
104 | are part of the system library and can be found |
109 | system library and can be found at <path>/usr/share/locale</path> on most |
105 | at <path>/usr/share/locale</path> on most systems. A locale name is generally |
110 | systems. A locale name is generally named <c>ab_CD</c> where <c>ab</c> is your |
106 | named <c>ab_CD</c> where <c>ab</c> is your two (or three) letter |
111 | two (or three) letter language code (as specified in ISO-639) and <c>CD</c> is |
107 | language code (as specified in ISO-639) and <c>CD</c> is your two letter country |
112 | your two letter country code (as specified in ISO-3166). Variants are often |
108 | code (as specified in ISO-3199). |
113 | appended to locale names, e.g. <c>en_GB.utf8</c> or <c>de_DE@euro</c>. Please |
|
|
114 | explore <uri link="http://en.wikipedia.org/wiki/Locale">Wikipedia</uri> to read |
|
|
115 | more about locales and related articles. |
109 | </p> |
116 | </p> |
110 | |
117 | |
111 | </body> |
118 | </body> |
112 | </section> |
119 | </section> |
113 | <section id="variables"> |
120 | <section id="variables"> |
… | |
… | |
117 | <p> |
124 | <p> |
118 | Locale settings are stored in environment variables. These are typically |
125 | Locale settings are stored in environment variables. These are typically |
119 | set in the <path>/etc/env.d/02locale</path> (for system-wide |
126 | set in the <path>/etc/env.d/02locale</path> (for system-wide |
120 | settings) and <path>~/.bashrc</path> (for user-specific settings) file. |
127 | settings) and <path>~/.bashrc</path> (for user-specific settings) file. |
121 | The variables controlling different aspects of locale settings |
128 | The variables controlling different aspects of locale settings |
122 | are given in the table below, those with highest precedence (ie. those |
129 | are given in the table below. All of them |
123 | that override settings below them) are at the top of the table. All variables |
|
|
124 | take one name of a locale in <c>ab_CD</c> format given above. |
130 | take one name of a locale in <c>ab_CD</c> format given above. |
125 | </p> |
131 | </p> |
126 | |
132 | |
127 | <table> |
133 | <table> |
128 | <tr> |
134 | <tr> |
129 | <th>Variable name</th> |
135 | <th>Variable name</th> |
130 | <th>Explanation</th> |
136 | <th>Explanation</th> |
131 | </tr> |
137 | </tr> |
132 | <tr> |
138 | <tr> |
133 | <ti>LC_ALL</ti> |
139 | <ti>LANG</ti> |
134 | <ti> |
140 | <ti> |
135 | Define all locale settings at once. This is the top level setting for |
141 | Defines all locale settings at once, while allowing further individual |
136 | locales which will override any other setting. |
142 | customization via the LC_* settings below. |
137 | </ti> |
143 | </ti> |
138 | </tr> |
144 | </tr> |
139 | <tr> |
145 | <tr> |
140 | <ti>LC_COLLATE</ti> |
146 | <ti>LC_COLLATE</ti> |
141 | <ti> |
147 | <ti> |
142 | Define alphabetical ordering of strings. This affects eg. output of sorted |
148 | Define alphabetical ordering of strings. This affects e.g. output of sorted |
143 | directory listing. |
149 | directory listing. |
144 | </ti> |
150 | </ti> |
145 | </tr> |
151 | </tr> |
146 | <tr> |
152 | <tr> |
147 | <ti>LC_CTYPE</ti> |
153 | <ti>LC_CTYPE</ti> |
… | |
… | |
177 | <tr> |
183 | <tr> |
178 | <ti>LC_PAPER</ti> |
184 | <ti>LC_PAPER</ti> |
179 | <ti>Defines default paper size.</ti> |
185 | <ti>Defines default paper size.</ti> |
180 | </tr> |
186 | </tr> |
181 | <tr> |
187 | <tr> |
182 | <ti>LANG</ti> |
188 | <ti>LC_ALL</ti> |
183 | <ti> |
189 | <ti> |
184 | Defines all locale settings at once. This setting can be overridden by |
190 | A special variable for overriding all other settings. |
185 | individual LC_* settings above or even by LC_ALL. |
|
|
186 | </ti> |
191 | </ti> |
187 | </tr> |
192 | </tr> |
188 | </table> |
193 | </table> |
189 | |
194 | |
190 | <note> |
195 | <note> |
191 | Even though most programs work with LC_ALL only, some of them misbehave if |
196 | Some programs are written in such a way that they expect traditional English |
192 | LC_ALL is set but LANG isn't. If you want to play safe, set them <e>both</e>. |
197 | ordering of the alphabet, while some locales, most notably the Estonian one, use |
|
|
198 | a different ordering. Therefore it's recommended to explicitly set LC_COLLATE to C |
|
|
199 | when dealing with system-wide settings. |
193 | </note> |
200 | </note> |
194 | |
201 | |
195 | <p> |
202 | <warn> |
196 | Most typically users only set the LANG variable and perhaps LC_CTYPE variable |
203 | For the same reason, using LC_ALL is strongly discouraged. Please use it only |
197 | on user level by adding definitions to shells startup files defining |
204 | when testing and never set it in a startup file. |
198 | the environment variable manually from command line: |
205 | </warn> |
|
|
206 | |
199 | </p> |
207 | <p> |
|
|
208 | Most typically users only set the LANG variable on the global basis: |
|
|
209 | </p> |
200 | |
210 | |
201 | <pre caption="setting the German locale"> |
211 | <pre caption="Setting the default system locale in /etc/env.d/02locale"> |
202 | export LANG="de_DE@euro" |
212 | LANG="de_DE.utf8@euro" |
|
|
213 | LC_COLLATE="C" |
203 | </pre> |
214 | </pre> |
204 | |
215 | |
205 | <note> |
216 | <note> |
206 | Append <c>@euro</c> to your locale if you want to use the Euro |
217 | Append <c>@euro</c> to your locale if you want to use the Euro |
207 | currency symbol (€) |
218 | currency symbol (€) |
208 | </note> |
219 | </note> |
|
|
220 | |
|
|
221 | <p> |
|
|
222 | It's also possible, and pretty common especially in a more traditional UNIX |
|
|
223 | environment, to leave the global settings unchanged, i.e. in the "<c>C</c>" |
|
|
224 | locale. Users can still specify their preferred locale in their own shell RC |
|
|
225 | file: |
|
|
226 | </p> |
|
|
227 | |
|
|
228 | <pre caption="Setting the user locale in ~/.bashrc"> |
|
|
229 | export LANG="de_DE.utf8@euro" |
|
|
230 | export LC_COLLATE="C" |
|
|
231 | </pre> |
|
|
232 | |
|
|
233 | <p> |
|
|
234 | Another way of configuring system is to leave it in the default C locale, but |
|
|
235 | enable UTF-8 character representation at the same time. This option is achieved |
|
|
236 | using the following settings in <path>/etc/env.d/02locale</path>: |
|
|
237 | </p> |
|
|
238 | |
|
|
239 | <pre caption="Using traditional C locale while specifying UTF-8"> |
|
|
240 | LC_CTYPE=de_DE.utf8 |
|
|
241 | </pre> |
|
|
242 | |
|
|
243 | <p> |
|
|
244 | Using the above snippet, users will be able to see localized file names |
|
|
245 | properly, while not being forced to your preferred language. |
|
|
246 | </p> |
209 | |
247 | |
210 | <p> |
248 | <p> |
211 | For message based localization to work in programs that support it, you will |
249 | For message based localization to work in programs that support it, you will |
212 | probably need to have programs compiled with the <c>nls</c> (Native language |
250 | probably need to have programs compiled with the <c>nls</c> (Native language |
213 | support) USE flag set. Most of the programs using nls also need the gettext |
251 | support) USE flag set. Most of the programs using nls also need the gettext |
214 | library to extract and use localized messages. Of course, Gentoo's Portage will |
252 | library to extract and use localized messages. Of course, Portage will |
215 | automatically install it when needed. |
253 | automatically install it when needed. |
216 | </p> |
254 | </p> |
|
|
255 | |
|
|
256 | <p> |
|
|
257 | Once you have set the right locale, be sure to update your environment |
|
|
258 | variables to make your system aware of the change: |
|
|
259 | </p> |
|
|
260 | |
|
|
261 | <pre caption="Update the environment"> |
|
|
262 | <comment>(For system-wide default locale:)</comment> |
|
|
263 | # <i>env-update && source /etc/profile</i> |
|
|
264 | |
|
|
265 | <comment>(For user-specific locale:)</comment> |
|
|
266 | $ <i>source ~/.bashrc</i> |
|
|
267 | </pre> |
|
|
268 | |
|
|
269 | <p> |
|
|
270 | After this, you will need to kill your X server by pressing |
|
|
271 | <c>Ctrl-Alt-Backspace</c>, log out, then log in as user. |
|
|
272 | </p> |
|
|
273 | |
|
|
274 | <p> |
|
|
275 | Now, verify that the changes have taken effect: |
|
|
276 | </p> |
|
|
277 | |
|
|
278 | <pre caption="Verify env changes"> |
|
|
279 | $ <i>locale</i> |
|
|
280 | </pre> |
217 | |
281 | |
218 | <p> |
282 | <p> |
219 | There is also additional localisation variable called LINGUAS, which affects |
283 | There is also additional localisation variable called LINGUAS, which affects |
220 | to localisation files that get installed in gettext-based programs, and decides |
284 | to localisation files that get installed in gettext-based programs, and decides |
221 | used localisation for some specific software packages, such as |
285 | used localisation for some specific software packages, such as |
222 | <c>kde-base/kde-i18n</c> and <c>app-office/openoffice</c>. The variable |
286 | <c>kde-base/kde-i18n</c> and <c>app-office/openoffice</c>. The variable |
223 | takes in <e>space</e>-separated list of language codes, and suggested |
287 | takes in <e>space</e>-separated list of language codes, and suggested |
224 | place to set it is <path>/etc/make.conf</path>: |
288 | place to set it is <path>/etc/make.conf</path>: |
225 | </p> |
289 | </p> |
226 | |
290 | |
227 | <pre caption="setting LINGUAS in make.conf"> |
291 | <pre caption="Setting LINGUAS in make.conf"> |
228 | # <i>nano -w /etc/make.conf</i> |
292 | # <i>nano -w /etc/make.conf</i> |
229 | <comment>(Add in the LINGUAS variable. For instance, |
293 | <comment>(Add in the LINGUAS variable. For instance, |
230 | for German, Finnish and English:)</comment> |
294 | for German, Finnish and English:)</comment> |
231 | LINGUAS="de fi en" |
295 | LINGUAS="de fi en" |
232 | </pre> |
296 | </pre> |
… | |
… | |
254 | |
318 | |
255 | <pre caption="Exporting the LANG variable"> |
319 | <pre caption="Exporting the LANG variable"> |
256 | # <i>export LANG="en_US.ISO-8859-15"</i> |
320 | # <i>export LANG="en_US.ISO-8859-15"</i> |
257 | </pre> |
321 | </pre> |
258 | |
322 | |
|
|
323 | <p> |
|
|
324 | Be sure to update the environment after the change: |
|
|
325 | </p> |
|
|
326 | |
|
|
327 | <pre caption="Update the environment"> |
|
|
328 | # <i>env-update && source /etc/profile</i> |
|
|
329 | </pre> |
|
|
330 | |
|
|
331 | <p> |
|
|
332 | After this, you will need to kill your X server by pressing |
|
|
333 | <c>Ctrl-Alt-Backspace</c>, log out, then log in as user. |
|
|
334 | </p> |
|
|
335 | |
259 | </body> |
336 | </body> |
260 | </section> |
|
|
261 | <section> |
337 | </section> |
262 | <title>The userlocales USE flag</title> |
338 | <section> |
|
|
339 | <title>Generating locales for glibc</title> |
263 | <body> |
340 | <body> |
264 | |
341 | |
265 | <p> |
342 | <p> |
266 | You will probably only use one or maybe two locales on your system. Up until now |
343 | You will probably only use one or maybe two locales on your system. You can |
267 | after compiling <c>glibc</c> a full set of all available locales has been |
|
|
268 | created. As of now you can activate the <c>userlocales</c> USE flag and specify |
|
|
269 | only the locales you will need in <path>/etc/locales.build</path>. |
344 | specify locales you will need in <path>/etc/locale.gen</path>. |
270 | </p> |
|
|
271 | |
|
|
272 | <pre caption="Activate the userlocales USE flag especially for glibc"> |
|
|
273 | echo "sys-libs/glibc userlocales" >> /etc/portage/package.use |
|
|
274 | </pre> |
|
|
275 | |
|
|
276 | <p> |
345 | </p> |
277 | Now specify the locales you want to be able to use: |
|
|
278 | </p> |
|
|
279 | |
346 | |
280 | <pre caption="Adding locales to /etc/locales.build"> |
347 | <pre caption="Adding locales to /etc/locale.gen"> |
281 | en_US/ISO-8859-1 |
348 | en_GB ISO-8859-1 |
282 | en_US.UTF-8/UTF-8 |
349 | en_GB.UTF-8 UTF-8 |
283 | de_DE/ISO-8859-1 |
350 | de_DE ISO-8859-1 |
284 | de_DE@euro/ISO-8859-15 |
351 | de_DE@euro ISO-8859-15 |
285 | </pre> |
352 | </pre> |
286 | |
353 | |
|
|
354 | <p> |
|
|
355 | The next step is to run <c>locale-gen</c>. It will generate all the locales you |
|
|
356 | have specified in the <path>/etc/locale.gen</path> file. |
287 | <p> |
357 | </p> |
288 | The next step is to re-compile <c>glibc</c>. Of course you can defer this until |
358 | |
289 | the next <c>glibc</c> upgrade is available. |
359 | <note> |
|
|
360 | <c>locale-gen</c> is available in <c>glibc-2.3.6-r4</c> and newer. If you have |
|
|
361 | an older version of glibc, you should update it now. |
|
|
362 | </note> |
|
|
363 | |
|
|
364 | <p> |
|
|
365 | You can verify that your selected locales are available by running <c>locale |
|
|
366 | -a</c>. |
290 | </p> |
367 | </p> |
291 | |
368 | |
292 | </body> |
369 | </body> |
293 | </section> |
370 | </section> |
294 | </chapter> |
371 | </chapter> |
… | |
… | |
307 | (<path>qwerty/</path>, <path>azerty/</path>, etc.). Some |
384 | (<path>qwerty/</path>, <path>azerty/</path>, etc.). Some |
308 | languages have multiple options, so you may wish to experiment |
385 | languages have multiple options, so you may wish to experiment |
309 | to decide which one fits your needs best. |
386 | to decide which one fits your needs best. |
310 | </p> |
387 | </p> |
311 | |
388 | |
312 | <pre caption="setting the console keymap"> |
389 | <pre caption="Setting the console keymap"> |
313 | KEYMAP="de" |
390 | KEYMAP="de" |
314 | KEYMAP="de-latin1" |
391 | KEYMAP="de-latin1" |
315 | KEYMAP="de-latin1-nodeadkeys" |
392 | KEYMAP="de-latin1-nodeadkeys" |
316 | </pre> |
393 | </pre> |
317 | |
394 | |
… | |
… | |
328 | The keyboard layout to be used by the X server is specified |
405 | The keyboard layout to be used by the X server is specified |
329 | in <path>/etc/X11/xorg.conf</path> by the <c>XkbLayout</c> |
406 | in <path>/etc/X11/xorg.conf</path> by the <c>XkbLayout</c> |
330 | option. |
407 | option. |
331 | </p> |
408 | </p> |
332 | |
409 | |
333 | <pre caption="setting the X keymap"> |
410 | <pre caption="Setting the X keymap"> |
334 | Section "InputDevice" |
411 | Section "InputDevice" |
335 | Identifier "Keyboard1" |
412 | Identifier "Keyboard1" |
336 | ... |
413 | ... |
337 | Option "XkbLayout" "de" |
414 | Option "XkbLayout" "de" |
338 | # Option "XkbVariant" "nodeadkeys" |
415 | #Option "XkbModel" "pc105" <comment>## this is for international keyboards.</comment> |
|
|
416 | # Option "XkbVariant" "nodeadkeys" <comment>## this would be used for xterm input</comment> |
339 | ... |
417 | ... |
340 | </pre> |
418 | </pre> |
|
|
419 | |
|
|
420 | <p> |
|
|
421 | If you have an international keyboard layout, you should set the option |
|
|
422 | <c>XkbModel</c> to <c>pc102</c> or <c>pc105</c>, as this will allow mapping of the |
|
|
423 | additional keys specific to your keyboard. |
|
|
424 | </p> |
|
|
425 | |
|
|
426 | <p> |
|
|
427 | Deadkeys allow you to press keys that will not show immediately but will be |
|
|
428 | combined with another letter to produce a single character such as é,è,á,à, |
|
|
429 | etc. Setting <c>XkbVariant</c> to <c>nodeadkeys</c> allows input these special |
|
|
430 | characters into X terminals. |
|
|
431 | </p> |
|
|
432 | |
|
|
433 | <p> |
|
|
434 | If you would like to switch between more than one keyboard layout (for example |
|
|
435 | English and Russian), all you have to do is add a few lines to |
|
|
436 | <path>xorg.conf</path> that specify the desired layouts and the shortcut |
|
|
437 | command. |
|
|
438 | </p> |
|
|
439 | |
|
|
440 | <pre caption="Switching between two keyboard layouts"> |
|
|
441 | Section "InputDevice" |
|
|
442 | Identifier "Keyboard1" |
|
|
443 | ... |
|
|
444 | Option "XkbLayout" "us,ru" |
|
|
445 | Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll" |
|
|
446 | </pre> |
|
|
447 | |
|
|
448 | <p> |
|
|
449 | Here, <c>XkbOptions</c> allows you to toggle between keyboard layouts by simply |
|
|
450 | pressing <c>Alt-Shift</c>. This will also toggle the Scroll Lock light on or |
|
|
451 | off, thanks to the <c>grp_led:scroll</c> option. This is a handy visual |
|
|
452 | indicator of which keyboard layout you are using at the moment. |
|
|
453 | </p> |
341 | |
454 | |
342 | </body> |
455 | </body> |
343 | </section> |
456 | </section> |
344 | </chapter> |
457 | </chapter> |
345 | |
458 | |
… | |
… | |
363 | <body> |
476 | <body> |
364 | |
477 | |
365 | <p> |
478 | <p> |
366 | In order to get your console to display the Euro symbol, you |
479 | In order to get your console to display the Euro symbol, you |
367 | will need to set <c>CONSOLEFONT</c> in |
480 | will need to set <c>CONSOLEFONT</c> in |
368 | <path>/etc/rc.conf</path> to a file found in |
481 | <path>/etc/conf.d/consolefont</path> to a file found in |
369 | <path>/usr/share/consolefonts/</path> (without the |
482 | <path>/usr/share/consolefonts/</path> (without the |
370 | <c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol. |
483 | <c>.psfu.gz</c>). <c>lat9w-16</c> has the Euro symbol. |
371 | </p> |
484 | </p> |
372 | |
485 | |
373 | <pre caption="setting the console font"> |
486 | <pre caption="Setting the console font"> |
374 | CONSOLEFONT="lat9w-16" |
487 | CONSOLEFONT="lat9w-16" |
375 | </pre> |
488 | </pre> |
376 | |
489 | |
|
|
490 | <p> |
|
|
491 | You should verify that <c>CONSOLEFONT</c> is in the boot runlevel: |
|
|
492 | </p> |
|
|
493 | |
|
|
494 | <pre caption="Verify the proper runlevel"> |
|
|
495 | # <i>rc-update -v show | grep -i consolefont</i> |
|
|
496 | </pre> |
|
|
497 | |
|
|
498 | <p> |
|
|
499 | If no runlevel is displayed for <c>CONSOLEFONT</c>, then add it to the proper level: |
|
|
500 | </p> |
|
|
501 | |
|
|
502 | <pre caption="Add consolefont to boot"> |
|
|
503 | # <i>rc-update add consolefont boot</i> |
|
|
504 | </pre> |
|
|
505 | |
377 | </body> |
506 | </body> |
378 | </section> |
507 | </section> |
379 | </chapter> |
508 | </chapter> |
380 | |
509 | |
381 | <chapter> |
510 | <chapter> |
… | |
… | |
383 | <section> |
512 | <section> |
384 | <title>Most Applications</title> |
513 | <title>Most Applications</title> |
385 | <body> |
514 | <body> |
386 | |
515 | |
387 | <p> |
516 | <p> |
388 | Getting the Euro symbol to work properly in X is a little |
517 | Getting the Euro symbol to work properly in X is a little bit tougher. The |
389 | bit tougher. The first thing you should do is change the <c>fixed</c> |
518 | first thing you should do is change the <c>fixed</c> and <c>variable</c> |
390 | and <c>variable</c> definitions in |
519 | definitions in <path>/usr/share/fonts/misc/fonts.alias</path> to end in |
391 | <path>/usr/X11R6/lib/X11/fonts/misc/fonts.alias</path> to end |
|
|
392 | in <c>iso8859-15</c> instead of <c>iso8859-1</c>. |
520 | <c>iso8859-15</c> instead of <c>iso8859-1</c>. |
393 | </p> |
521 | </p> |
394 | |
522 | |
395 | <pre caption="setting default X fonts"> |
523 | <pre caption="Setting default X fonts"> |
396 | fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15 |
524 | fixed -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-15 |
397 | variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15 |
525 | variable -*-helvetica-bold-r-normal-*-*-120-*-*-*-*-iso8859-15 |
398 | </pre> |
526 | </pre> |
399 | |
527 | |
400 | <p> |
528 | <p> |
401 | Some applications use their own font, and you will have to |
529 | Some applications use their own font, and you will have to tell them separately |
402 | tell them separately to use a font with the Euro symbol. You |
530 | to use a font with the Euro symbol. You can do this at a user-specific level in |
403 | can do this at a user-specific level in |
|
|
404 | <path>.Xdefaults</path> (you can copy this file to |
531 | <path>.Xdefaults</path> (you can copy this file to <path>/etc/skel/</path> for |
405 | <path>/etc/skel/</path> for use by new users), or at a global |
532 | use by new users), or at a global level for any application with a resource file |
406 | level for any application with a resource file in |
|
|
407 | <path>/usr/X11R6/lib/X11/app-defaults/</path> (like xterm). In |
533 | in <path>/usr/share/X11/app-defaults/</path> (like xterm). In these files you |
408 | these files you generally have to change an existing line, |
534 | generally have to change an existing line, rather than adding a new one. To |
409 | rather than adding a new one. To change our xterm font, for |
535 | change our xterm font, for instance: |
410 | instance: |
|
|
411 | </p> |
536 | </p> |
412 | |
537 | |
413 | <pre caption="setting fonts for xterm"> |
538 | <pre caption="Setting fonts for xterm"> |
414 | <comment>(in your home directory)</comment> |
539 | <comment>(in your home directory)</comment> |
415 | # <i>echo 'XTerm*font: fixed' >> .Xresources </i> |
540 | $ <i>echo 'XTerm*font: fixed' >> .Xresources </i> |
416 | # <i>xrdb -merge .Xresources</i> |
541 | $ <i>xrdb -merge .Xresources</i> |
417 | </pre> |
542 | </pre> |
418 | |
543 | |
419 | </body> |
544 | </body> |
420 | </section> |
545 | </section> |
421 | <section> |
546 | <section> |
… | |
… | |
435 | For XEmacs (not plain Emacs), you have to do a little |
560 | For XEmacs (not plain Emacs), you have to do a little |
436 | more. In <path>/home/user/.xemacs/init.el</path>, add: |
561 | more. In <path>/home/user/.xemacs/init.el</path>, add: |
437 | </p> |
562 | </p> |
438 | |
563 | |
439 | <pre caption="setting the font for xemacs"> |
564 | <pre caption="setting the font for xemacs"> |
440 | (define-key global-map '(EuroSign) '[€]) |
565 | (define-key global-map '(EuroSign) '[€]) |
441 | </pre> |
566 | </pre> |
442 | |
567 | |
443 | <note> |
568 | <note> |
444 | The symbol in the []s is the Euro symbol. |
569 | The symbol in the []s is the Euro symbol. |
445 | </note> |
570 | </note> |
… | |
… | |
449 | <section> |
574 | <section> |
450 | <title>OpenOffice.Org</title> |
575 | <title>OpenOffice.Org</title> |
451 | <body> |
576 | <body> |
452 | |
577 | |
453 | <p> |
578 | <p> |
454 | The current <c>app-office/openoffice</c> (or <c>-ximian</c>) source ebuilds |
579 | The current stable <c>app-office/openoffice</c> and |
|
|
580 | <c>app-office/openoffice-bin</c> ebuilds support the <uri |
455 | support <uri link="#variables">LINGUAS variable</uri> for selecting installed |
581 | link="#variables">LINGUAS variable</uri> for selecting installed GUI language |
456 | GUI language packs. The current <e>stable</e> |
582 | packs. To see the status of GUI translation, hyphenation, spell checking and |
457 | <c>app-office/openoffice-bin</c> binary ebuilds do <e>not</e> yet |
583 | other localisations on your language, please refer to <uri |
458 | support LINGUAS variable, however, so in order to use localised OpenOffice.Org |
|
|
459 | you must either install the source version, or, with your discretion, the |
|
|
460 | unstable binary version. To see status of GUI translation, |
|
|
461 | hyphenation, spell checking and other localisations on your language, please |
|
|
462 | refer to |
|
|
463 | <uri link="http://l10n.openoffice.org/languages.html">OpenOffice.Org |
584 | link="http://l10n.openoffice.org/languages.html">OpenOffice.Org localisation |
464 | localisation web site</uri>. |
585 | web site</uri>. |
465 | </p> |
586 | </p> |
466 | |
587 | |
467 | </body> |
588 | </body> |
468 | </section> |
589 | </section> |
469 | </chapter> |
590 | </chapter> |