Bring BSD-licensed ext2fs from FreeBSD
[ikiwiki.git] / docs / handbook / handbook-lang-setup.mdwn
1 \r
2 \r
3 ## 14.5 Localizing DragonFly to Specific Languages \r
4 \r
5 ### 14.5.1 Russian Language (KOI8-R Encoding) \r
6 \r
7 ***Originally contributed by Andrey A. Chernov. ***\r
8 \r
9 For more information about KOI8-R encoding, see the [KOI8-R References (Russian Net Character Set)](http://koi8.pp.ru/).\r
10 \r
11 #### 14.5.1.1 Locale Setup \r
12 \r
13 Put the following lines into your `~/.login_conf` file:\r
14 \r
15     \r
16     me:My Account:\\r
17         :charset=KOI8-R:\\r
18         :lang=ru_RU.KOI8-R:\r
19 \r
20 \r
21 See earlier in this chapter for examples of setting up the [locale](using-localization.html#SETTING-LOCALE).\r
22 \r
23 #### 14.5.1.2 Console Setup \r
24 \r
25
26 * Add the following line to your kernel configuration file:\r
27       \r
28       options           SC_MOUSE_CHAR=0x03\r
29   \r
30   Insert the following line into `/etc/rc.conf`:\r
31       \r
32       mousechar_start=3\r
33   \r
34
35 * Use following settings in `/etc/rc.conf`:\r
36       \r
37       keymap="ru.koi8-r"\r
38       scrnmap="koi8-r2cp866"\r
39       font8x16="cp866b-8x16"\r
40       font8x14="cp866-8x14"\r
41       font8x8="cp866-8x8"\r
42   \r
43
44 * For each `ttyv*` entry in `/etc/ttys`, use `cons25r` as the terminal type.\r
45 \r
46 See earlier in this chapter for examples of setting up the [console](using-localization.html#SETTING-CONSOLE).\r
47 \r
48 #### 14.5.1.3 Printer Setup \r
49 \r
50 Since most printers with Russian characters come with hardware code page CP866, a special output filter is needed to convert from KOI8-R to CP866. Such a filter is installed by default as `/usr/libexec/lpr/ru/koi2alt`. A Russian printer `/etc/printcap` entry should look like:\r
51 \r
52     \r
53     lp|Russian local line printer:\\r
54         :sh:of=/usr/libexec/lpr/ru/koi2alt:\\r
55         :lp#/dev/lpt0:sd/var/spool/output/lpd:lf=/var/log/lpd-errs:\r
56 \r
57 \r
58 See [printcap(5)](http://leaf.dragonflybsd.org/cgi/web-man?command#printcap&section5) for a detailed description.\r
59 \r
60 #### 14.5.1.4 MS-DOS® FS and Russian Filenames \r
61 \r
62 The following example [fstab(5)](http://leaf.dragonflybsd.org/cgi/web-man?command#fstab&section5) entry enables support for Russian filenames in mounted MS-DOS® filesystems:\r
63 \r
64     \r
65     /dev/ad0s2      /dos/c  msdos   rw,-Wkoi2dos,-Lru_RU.KOI8-R 0 0\r
66 \r
67 \r
68 The option `-L` selects the locale name used, and `-W` sets the character conversion table. To use the `-W` option, be sure to mount `/usr` before the MS-DOS partition because the conversion tables are located in `/usr/libdata/msdosfs`. For more informations, see the [mount_msdos(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#mount_msdos&section8) manual page.\r
69 \r
70 #### 14.5.1.5 X11 Setup \r
71 \r
72   1. Do [using-localization.html#SETTING-LOCALE non-X locale setup] first as described.\r
73    **Note:** The Russian KOI8-R locale may not work with old  **XFree86™**  releases (lower than 3.3).  **XFree86 4.X**  is now the default version of the X Window System on DragonFly. This should not be an issue unless you explicitly install an older version of  **XFree86** .\r
74   1. Go to the [russian/X.language](http://pkgsrc.se/russian/X.language) directory and issue the following command:\r
75       \r
76       # make install\r
77   \r
78   The above port installs the latest version of the KOI8-R fonts. ***'XFree86 3.3***' already has some KOI8-R fonts, but these are scaled better.\r
79   Check the `"Files"` section in your `/etc/XF86Config` file. The following lines must be added ***before*** any other `FontPath` entries:\r
80       \r
81       FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/misc"\r
82       FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"\r
83       FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"\r
84   \r
85   If you use a high resolution video mode, swap the 75 dpi and 100 dpi lines.\r
86   1. To activate a Russian keyboard, add the following to the `"Keyboard"` section of your `XF86Config` file.\r
87   For ***'XFree86 3.X***':\r
88       \r
89       XkbLayout  "ru"\r
90       XkbOptions "grp:caps_toggle"\r
91   \r
92   For  **XFree86 4.X** :\r
93       \r
94       Option "XkbLayout"   "ru"\r
95       Option "XkbOptions"  "grp:caps_toggle"\r
96   \r
97   Also make sure that `XkbDisable` is turned off (commented out) there.\r
98   The RUS/LAT switch will be  **CapsLock** . The old  **CapsLock**  function is still available via  **Shift** + **CapsLock**  (in LAT mode only).\r
99   If you have ***Windows®*** keys on your keyboard, and notice that some non-alphabetical keys are mapped incorrectly in RUS mode, add the following line in your `XF86Config` file.\r
100   For ***'XFree86 3.X***':\r
101       \r
102       XkbVariant "winkeys"\r
103   \r
104   For  **XFree86 4.X** :\r
105       \r
106       Option "XkbVariant" "winkeys"\r
107   \r
108    **Note:** The Russian XKB keyboard may not work with old  **XFree86**  versions, see the [lang-setup.html#RUSSIAN-NOTE above note] for more information. The Russian XKB keyboard may also not work with non-localized applications as well. Minimally localized applications should call a `XtSetLanguageProc (NULL, NULL, NULL);` function early in the program. See [KOI8-R for X Window](http://koi8.pp.ru/xwin.html) for more instructions on localizing X11 applications.\r
109 \r
110 ### 14.5.2 Traditional Chinese Localization for Taiwan \r
111 \r
112 The FreeBSD-Taiwan Project has an I18N/L10N tutorial for FreeBSD at http://freebsd.sinica.edu.tw/~ncvs/zh-l10n-tut/ using many Chinese ports. Much of that project can apply to DragonFly. The editor for the `zh-L10N-tut` is Clive Lin. You can also cvsup the following collections at `freebsd.sinica.edu.tw`:\r
113 \r
114 [[!table  data="""
115 | Collection | Description 
116  outta-port tag=. | Beta-quality ports collection for Chinese 
117  zh-L10N-tut tag=. | Localizing FreeBSD Tutorial in BIG-5 Traditional Chinese 
118  zh-doc tag=. | FreeBSD Documentation Translation to BIG-5 Traditional Chinese |\r
119 """]]\r
120 Chuan-Hsing Shen has created the [Chinese FreeBSD Collection (CFC)](http://cnpa.yzu.edu.tw/~cfc/) using FreeBSD-Taiwan's `zh-L10N-tut`. The packages and the script files are available at ftp://ftp.csie.ncu.edu.tw/OS/FreeBSD/taiwan/CFC/.\r
121 \r
122 ### 14.5.3 German Language Localization (for All ISO 8859-1 Languages) \r
123 \r
124 Slaven Rezic `<[mailto:eserte@cs.tu-berlin.de eserte@cs.tu-berlin.de]>` wrote a tutorial how to use umlauts on a FreeBSD machine. The tutorial is written in German and available at http://www.de.FreeBSD.org/de/umlaute/.\r
125 \r
126 ### 14.5.4 Japanese and Korean Language Localization \r
127 \r
128 For Japanese, refer to http://www.jp.FreeBSD.org/, and for Korean, refer to http://www.kr.FreeBSD.org/.\r
129 \r
130 ### 14.5.5 Non-English DragonFly Documentation \r
131 \r
132 Non-English documentation will be made available as it is created, at the [main site](../../../../index.html) or in `/usr/share/doc`.\r
133 \r
134 \r
135 \r
136 CategoryHandbook\r
137 CategoryHandbook-localization\r