International Language Support

From SlackWiki
Revision as of 02:23, 3 June 2009 by Erik (talk | contribs) (Copy from old, had no category, placed in Tutorials)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This tutorial is not finished yet. Come back at a later time.

Last updated: --apeitheo 21:58, 10 Apr 2005 (BST)

The aim of this tutorial is to allow you to use Linux with the language of your choice. I often need to type German characters (ßüö䀄“) on my keyboard, but it took some time to copy the chosen character and paste it where needed. I could have changed the layout, but I prefer to use the English layout due to programming a lot, and I'm just generally more adapted to this layout.

With the use of "compose" and "dead" keys you will be able to type foreign characters of your choice, while still preserving your current layout. The only requirement, which provides definitions for foreign characters, is the glibc-i18n package, which can be obtained from The Slackware package browser or on your Slackware cd in slackware/l.

Keyboard Support

This section will provide you with information on how to setup your keyboard for foreign characters. If you wish to use it both outside & inside of X, follow both sections.

X11

-- Speak about xmodmap/xkb, rewrite parts reflecting "compose" keys

In order to type foreign characters without modifying your current keyboard layout, we will make use of xmodmap and a "dead key" of your choice. To start, you should locate the corresponding xmodmap.* file that is for your current keyboard layout. Since I use an English keyboard, mine was found at "/usr/share/xmodmap/xmodmap.us". Once you've located it, copy it to your user directory and make it hidden, like this:

 cp /usr/share/xmodmap/xmodmap.us-101 /home/joe/.xmodmap

Open this file up for editing with your favorite text editor:

gedit /home/joe/.xmodmap

Now is a good time to take a look at the long list of "keysyms" which are supported by xmodmap. This can be found here. Locate the special characters that you are missing on your current keyboard layout. In the .xmodmap file find the keys which you want to be used with the "dead keys." For example, so that I can use the 'u' key for ü and Ü, I would change:

keycode 30 = u U udiaeresis Udiaeresis

The first 'u' is what is usually pressed. The second character, "U" is what is typed when I push the shift key and the 'u'. The same thing goes for the second part, 'udiaeresis' is typed when I push my right alt key and 'u'. As you can expect, 'Udiaeresis' is typed when I push the right alt key, the shift key, and the 'u'. It's that simple.

You may need to assign a key to be the Mode_switch key (which in my case, was the right alt key), or change it if you don't like the current one. This can be done by changing the specified keycode line to point to "Mode_switch," such as this:

(Before Editing)

keycode 113 = Alt_R Meta_R

(After Editing)

keycode 113 = Mode_switch

NOTE: If you use Gnome or KDE, this next step will not be necessarily unless you manually load them up through ~/.xinitrc.

Once you've finished modifying your custom .xmodmap file, save it, and then open up your ~/.xinitrc file and add the line:

exec xmodmap ~/.xmodmap

as well as appending an ampersand (&) to the line previous to the last.

For example:

(Before Editing)

#!/bin/bash
exec enlightenment

(After Editing)

#!/bin/bash
exec enlightenment &
exec xmodmap ~/.xmodmap

Save this file, type startx, and you're ready to go.

NOT FINISHED YET - elaborate on .xmodmap file (Mode_Switch), xev, and xmodmap -pke

Console

Additional Notes

Application Support

This section will provide you with information on how to setup your computer to display applications in the language of your choosing.

-- Speak about LANG settings

Additional Notes

Conclusion

External Links

The Slackware package browser

List of Keysyms