I think it's high time to create a small HOWTO on How to localize Slackware.
Add posts about your language to help others.
This post is about Russian language.
This works in Slackware10.x.
I localize my system to KOI8-R, because mc which I use sometimes, doesn't understand UTF-8. And just because KOI8-R really rocks!
First, I made a script to localize system:
#this creates executable font script which will be run every system startup to set font for console
chmod +x /etc/rc.d/rc.font
#this removes unnecessary now OLD font script
rm -f /etc/rc.d/rc.font.new
#this soft-links console key map to necessary dir (to avoid copying and wasting space)
ln -s /home/other/src/ru42.map.gz /usr/share/kbd/keymaps/i386/qwerty/
#this writes the necessary contents to rc.font
echo 'setfont -v cp866-8x16
for i in 1 2 3 4 5 6; do
echo -ne "\033(K" > /dev/tty$i
#this writes necessary contents to lang.sh which is also run every startup to set system language
echo 'export LANG=ru_RU.KOI8-R
#this is necessary too...
echo 'russian ru_RU.KOI8-R
#this runs rc.font so that we don't have to wait for console localization untill next startup
#this copies Windows fonts, I wonder why they look so ugly in Windows, and so pretty in X
#/home/other/fonts contains Windows TTF fonts
cp /home/other/fonts/* /usr/X11/lib/X11/fonts/cyrillic
I run the script after every Linux re-installation, then I reboot and get russified console. Then I edit /etc/X11/xorg.conf (actually I've edited it long ago, and now just keep it between re-installations) this way:
- - - -
- - - -
Option "XkbLayout" "en_US,ru(winkeys)"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
- - - -
The first line allows two layouts in X, the second one allows me to switch layouts pressing Alt+Shift, also when Russian is on Scroll Indicator is on.
Ok, now console and X undestand Russian very well. But I have some Windows partitions and want to be able to see correct Russian filenames there. (I have FAT32 for Windows to be able to write from Linux, but it shouldn't make any difference)
CD-ROMS and floppies may be with Russian filenames as well.
I edit /etc/fstab like this:
- - - -
/dev/hda7 /mnt/windata vfat iocharset=koi8-r,umask=000 0 0
/dev/hda8 /mnt/winsys vfat iocharset=koi8-r,umask=000 0 0
/dev/cdrom /mnt/cdrom iso9660 iocharset=koi8-r,noauto,group,ro 0 0
/dev/fd0 /mnt/floppy vfat iocharset=koi8-r,noauto,group 0 0
- - - -
"umask=000" means that every user is able to write to Windows partitions.
Also I use kernel 2.4.x, while in 2.6.x "iocharset" option is deprecated and you should use smth like "nls" (see FAT32 and NTFS sections of "man mount" for more info).
And lastly, when I was using KDE (now I'm using XFCE
) I had to:
1) select System Admin -> Font Installer in Control Center (yeah, just select);
2) add Russian language in Regional & Accesibility -> Country / Region & Language.
That should be enough to feel yourself like a real Russian Linux user