Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

22.5 Localizing FreeBSD to Specific Languages

22.5.1 Russian Language (KOI8-R Encoding)

Originally contributed by Andrey Chernov.

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

22.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.

22.5.1.2 Console Setup

  • Add the following line to your /etc/rc.conf file:

    mousechar_start=3
    
  • Also, 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.

22.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.

22.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

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 information, see the mount_msdosfs(8) manual page.

22.5.1.5 X11 Setup

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

  2. If you use Xorg, install x11-fonts/xorg-fonts-cyrillic package.

    Check the "Files" section in your /etc/X11/xorg.conf 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.

    Note: See ports for more cyrillic fonts.

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

    Option "XkbLayout"   "us,ru"
    Option "XkbOptions"  "grp:toggle"
    

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

    For grp:caps_toggle the RUS/LAT switch will be Right Alt, for grp:ctrl_shift_toggle switch will be Ctrl+Shift. The old CapsLock function is still available via Shift+CapsLock (in LAT mode only). For grp:toggle the RUS/LAT switch will be Right Alt. grp:caps_toggle does not work in Xorg for unknown reason.

    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 xorg.conf file:

    Option "XkbVariant" ",winkeys"
    

    Note: The Russian XKB keyboard may not work with non-localized applications.

Note: 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.

22.5.2 Traditional Chinese Localization for Taiwan

The FreeBSD-Taiwan Project has an Chinese HOWTO for FreeBSD at https://netlab.cse.yzu.edu.tw/~statue/freebsd/zh-tut/ using many Chinese ports. Current editor for the FreeBSD Chinese HOWTO is Shen Chuan-Hsing .

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://freebsd.csie.nctu.edu.tw/pub/taiwan/CFC/.

22.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 https://user.cs.tu-berlin.de/~eserte/FreeBSD/doc/umlaute/umlaute.html.

22.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.


 
 
  Published under the terms of the FreeBSD Document Project