The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации / Документация по FreeBSD / Руководства по FreeBSD на английском

14.5 Localizing FreeBSD to Specific Languages

14.5.1 Russian Language (KOI8-R encoding)

Originally contributed by Andrey A. Chernov.

For more information about KOI8-R encoding, see the KOI8-R References (Russian Net Character Set).

14.5.1.1 Locale Setup

Put the following lines into your ~/.login_conf file:

    me:My Account:\
        :charset=KOI8-R:\
        :lang=ru_RU.KOI8-R:

See earlier in this chapter for examples of setting up the locale.

14.5.1.2 Console Setup

  • For the FreeBSD versions before 5.0 add the following line to your kernel configuration file:

        options        SC_MOUSE_CHAR=0x03
    

    For the FreeBSD versions 4.4 and up insert the following line into /etc/rc.conf:

        mousechar_start=3
    
  • Use following settings in /etc/rc.conf:

        keymap="ru.koi8-r"
        scrnmap="koi8-r2cp866"
        font8x16="cp866b-8x16"
        font8x14="cp866-8x14"
        font8x8="cp866-8x8"
    
  • For each ttyv* entry in /etc/ttys, use cons25r as the terminal type.

See earlier in this chapter for examples of setting up the console.

14.5.1.3 Printer Setup

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:

    lp|Russian local line printer:\
        :sh:of=/usr/libexec/lpr/ru/koi2alt:\
        :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:

See printcap(5) for a detailed description.

14.5.1.4 MS-DOS FS and Russian Filenames

The following example fstab(5) entry enables support for Russian filenames in mounted MS-DOS filesystems:

    /dev/ad0s2      /dos/c  msdos   rw,-Wkoi2dos,-Lru_RU.KOI8-R 0 0

See mount_msdos(8) for a detailed description of the -W and -L options.

14.5.1.5 X11 Setup

  1. Do non-X locale setup first as described.

    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 FreeBSD. This should not be an issue unless you are using an old version of FreeBSD.

  2. Go to the russian/X.language directory and issue the following command:

        # make install
    

    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.

    Check the "Files" section in your /etc/XF86Config file. The following lines must be added before any other FontPath entries:

        FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/misc"
        FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/75dpi"
        FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"
    

    If you use a high resolution video mode, swap the 75 dpi and 100 dpi lines.

  3. To activate a Russian keyboard, add the following to the "Keyboard" section of your XF86Config file.

    For XFree86 3.X:

        XkbLayout  "ru"
        XkbOptions "grp:caps_toggle"
    

    For XFree86 4.X:

        Option "XkbLayout"   "ru"
        Option "XkbOptions"  "grp:caps_toggle"
    

    Also make sure that XkbDisable is turned off (commented out) there.

    The RUS/LAT switch will be CapsLock. The old CapsLock function is still available via Shift+CapsLock (in LAT mode only).

    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.

    For XFree86 3.X:

        XkbVariant "winkeys"
    

    For XFree86 4.X:

        Option "XkbVariant" "winkeys"
    

    Note: The Russian XKB keyboard may not work with old XFree86 versions, see the 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 for more instructions on localizing X11 applications.

14.5.2 Traditional Chinese Localization for Taiwan

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. The editor for the zh-L10N-tut is Clive Lin . You can also cvsup the following collections at freebsd.sinica.edu.tw:

Collection Description
outta-port tag=. Beta-quality ports collection for Chinese
zh-L10N-tut tag=. Localizing FreeBSD Tutorial in BIG-5 Traditional Chinese
zh-doc tag=. FreeBSD Documentation Translation to BIG-5 Traditional Chinese

Chuan-Hsing Shen has created the Chinese FreeBSD Collection (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/.

14.5.3 German Language Localization (For All ISO 8859-1 Languages)

Slaven Rezic 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/.

14.5.4 Japanese and Korean Language Localization

For Japanese, refer to http://www.jp.FreeBSD.org/, and for Korean, refer to http://www.kr.FreeBSD.org/.

14.5.5 Non-English FreeBSD Documentation

Some FreeBSD contributors have translated parts of FreeBSD to other languages. They are available through links on the main site or in /usr/share/doc.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру