YaK:: INTERNATIONALIZATION HOW-TO (Gentoo) [Changes]   [Calendar]   [Search]   [Index]   [PhotoTags]   
[mega_changes]
[photos]

INTERNATIONALIZATION HOW-TO (Gentoo)

Ok, I recently went through a hell of a lot trying to get international char sets to display properly on my box. As a Russian major, this was absolutely necessary, and if I was unable to get it working, I was going to have to give up my precious Gentoo in favor of something like Knoppix, that does it out of the box. Luckily, a solution arose!

This is an attempt to remember all the things I did--I could be wrong, or I could be forgetting a step. If anyone has any corrections, please let me know!

1) First things first: set the nls USE flag, and re-emerge all crucial packages that use this flag (glibc, fontconfig, etc etc). Depending on your locale, there may be other flags to set as well (I think cjk is an example--as I use cyrillic, though, it hasn't affected me, and I haven't had any trouble viewing other foreign charsets). In the event that you were paying attention when installing your system, you likely already have this flag set.

2) Make sure you have the fonts installed. Again, you probably do, but if not, fix it. You can find font help at te gentoo website, I'm sure: gentoo.org.

3) Make sure xfs is installed and starts. I suggest going on and using "rc-update add xfs default" as root.

4) Edit /etc/X11/fs/config. Close to the top, point the file to your font directories:

#example


catalogue =  /usr/X11R6/lib/X11/fonts/75dpi,
        /usr/X11R6/lib/X11/fonts/100dpi,
        /usr/X11R6/lib/X11/fonts/misc,
        /usr/X11R6/lib/X11/fonts/Type1,
        /usr/X11R6/lib/X11/fonts/Speedo,
        /usr/X11R6/lib/X11/fonts/CID,
        /usr/X11R6/lib/X11/fonts/util,
        /usr/X11R6/lib/X11/fonts/local,
        /usr/X11R6/lib/X11/fonts/Speedo,
        /usr/X11R6/lib/X11/fonts/truetype,
        /usr/X11R6/lib/X11/fonts/TTF,
        /usr/X11R6/lib/X11/fonts/cyrillic,
        /usr/X11R6/lib/X11/fonts/freefont,
        /usr/X11R6/lib/X11/fonts/sharefont,
        /usr/share/fonts/default/Type1,
        /usr/share/fonts/ttf/decoratives,
        /usr/share/fonts/ttf/western

5) [this may be an alternative way to do thingsd, or it may be necessary. Either way, this doesn't hurt, and my be crucial:

In /etc/X11/XF86Config set the FontPath as follows:

Fontpath "unix/:-1"

6) In /etc/fonts/local.conf, specify your font directories as follows:

#example

<fontconfig>
<dir>/usr/X11R6/lib/X11/fonts/75dpi</dir>
<dir>/usr/X11R6/lib/X11/fonts/100dpi</dir>
<dir>/usr/X11R6/lib/X11/fonts/misc</dir>
<dir>/usr/X11R6/lib/X11/fonts/Type1</dir>
<dir>/usr/X11R6/lib/X11/fonts/Speedo</dir>
<dir>/usr/X11R6/lib/X11/fonts/CID</dir>
<dir>/usr/X11R6/lib/X11/fonts/util</dir>
<dir>/usr/X11R6/lib/X11/fonts/local</dir>
<dir>/usr/X11R6/lib/X11/fonts/Speedo</dir>
<dir>/usr/X11R6/lib/X11/fonts/truetype</dir>
<dir>/usr/X11R6/lib/X11/fonts/TTF</dir>
<dir>/usr/X11R6/lib/X11/fonts/cyrillic</dir>
<dir>/usr/X11R6/lib/X11/fonts/freefont</dir>
<dir>/usr/X11R6/lib/X11/fonts/sharefont</dir>
<dir>/usr/share/fonts/default/Type1</dir>
<dir>/usr/share/fonts/ttf/decoratives</dir>
<dir>/usr/share/fonts/ttf/western</dir>
</fontconfig>

7) as root, restart xfs:

/etc/init.d/xfs restart

8) You may have to set the encoding for your favorite programs to unicode, or the may do it automatically. If you do need to change it, it's easily done from within the programs themselves.

9) This should have most or all of your programs seeing cyrillic, and TrueType, I think. Modify these to suit your language or choice, I suppose--and again, some other languages may require other flags. As always, when doing system maintenance unfamiliar to you, consider making backup copies of files you're changing.

10) For keyboard switching, I use the backend of a gnome applet. The command for a russian keyboard layout is "gkb_xmmap ru-rev" (without the quotes, obviously). An american keyboard: "setxkbmap us". If you are using flux, I suggest having the command to switch back, before you switch out. ;-) If you are on gnome, etc. you can use the applet front end. Enjoy!

In the event that I'm miss something, or messed up, again, please feel free to correct me--I'm far from a guru, and this is my first remote attempt at a how-to.

Sitha

[ Sorry, all guestbooks disabled temporarily due to rampant spam :(   ]
(unless otherwise marked) Copyright 2002-2014 YakPeople. All rights reserved.
(last modified 2003-11-08)       [Login]
(No back references.)