| Internationalization in Mandrakelinux 10.1 |
|---|
| a mini guide to SCIM/UIM |
| HOME |
Mandrakelinux is renowned for supporting more than seventy languages from different parts of the world. Nevertheless, life was not easy for users who needed to write in more than one language which requires a special input method on a daily basis. In order to switch from Japanese input method to Chinese, for example, you had to change the whole locale settings and start a new session. In Mandrakelinux 10.1, it is not the case anymore.
SCIM (Smart Common Input Method) has solved this problem. It can work as the frontend of many input methods including those developed by other projects such as UIM (Universal Input Method) and provides a nice unified user interface. Whether in Qt applications (using SCIM-XIM) or in GTK applications (using gtk-immodule), you can change input methods on the fly via the SCIM menu or with a simple keyboard shortcut. How about making Japanese-Chinese flash cards in FlashKard? :)
I wrote this page for people who use SCIM or UIM for the first time in Mandrakelinux 10.1. For technical details, please visit the links at the bottom of this page.
This page is outdated. Please refer to SCIM-anthy: getting started for more recent information.
Available packages:
Select packages according to your need. For example, if you need Japanese and Greek input methods, install scim, uim, anthy, scim-uim, m17n-lib and scim-m17n.
![]() | Note |
|---|---|
If you chose Japanese for your language at the time of installation, scim, uim, anthy and scim-uim are already installed. If you chose Chinese, traditional or simplified, scim, scim-chinese and scim-tables are installed. If you chose Korean, scim and scim-hangul are installed. | |
Add the following three lines to ~/.i18n. This makes SCIM start as a daemon when you start X.
GTK_IM_MODULE=scim XIM_PROGRAM="scim -d" XMODIFIERS=@im=SCIM |
![]() | Note |
|---|---|
| If you select Japanese, Chinese or Korean for your language or SCIM for your input method in LocaleDrake, those lines are automatically added to | |
You can use all input methods in GTK applications regardless of your locale, but they are filtered by LC_CTYPE in Qt applications. In other words, if LC_CTYPE is set to ja_JP, you can only use Japanese input methods in Qt applications. To make all input methods accessible from everywhere, an UTF-8 locale is required.
SCIM supports en_US.UTF-8 by default. If you use other UTF-8 like fr_FR.UTF-8, add it to
/SupportedUnicodeLocales = en_US.UTF-8,fr_FR.UTF-8 |
Ready. When you start a new session, you will see a keyboard icon in your systray.
Open an editor and press Ctrl+Space to start SCIM. The SCIM toolbar will show up at the bottom right corner of your screen. Press Shift+Space to switch to the Hiragana input mode. When you see an 'a' in Hiragana on the toolbar, you are ready to type Japanese.
![[Toolbar]](toolbar.png)
Type 'kisha', for example. It will appear in Hiragana on the screen.
![[Hiragana]](hiragana.png)
Press Space to convert the text to Kanji or Katakana. The text turns into the first candidate. Press Space again to select a next candidate. At this point, a group of candidates will appear in a lookup window.
![[Conversion]](conversion.png)
When you get the the right word, press Enter or simply start typing a new word.
UIM-anthy is designed to convert a phrase/sentence consisting of multiple segments. You can move the highlight in a converted string with left/right arrow and narrow/broaden it with
![[Conversion]](conversion1.png)
Press Shift+Space to go back to the ASCII input mode.
For more details, please refer to uim-anthy: Getting started on the uim-anthy wiki. You can also find all key combinations to generate Hiraganas in
Open an editor and press Ctrl+Space to start SCIM. The SCIM toolbar will show up at the bottom right corner of your screen.
![[Toolbar]](toolbar1.png)
You are ready to type Chinese using Smart Pinyin. It allows incomplete pinyin by default.
![[Pinyin]](pinyin.png)
If you use other input method like Wubi, click on the input method label on the toolbar and select it from the menu. All keyboard shortcuts of Smart Pinyin and other Chinese input methods are explained in the SCIM Help.
There are many things that you can customize in the SCIM setup panel. Here are some examples.
![]() | Input style in Qt applications |
|---|---|
If you prefer 'On The Spot', open the SCIM setup panel, go to X Window and tick 'On The Spot' for XIM settings. If you prefer 'Over The Spot', leave the checkbox unchecked. In each case, remember to run $ qtconfig and select the same style for XIM Input style under the Interface tab. Also, note that some programs do not support the 'On The Spot' input style. | |
![]() | Enable/disable input methods |
|---|---|
If you install all the packages listed above, you end up with nearly 100 input methods! It is recommended to disable unnecessary input methods to speed up the start-up of GTK applications. Open the SCIM setup panel and click on 'IMEngins' in the left pane. You can enable/disable input methods there. | |
![]() | Root programs | |
|---|---|---|
When you start a root program based on GTK (like Mandrake Control Center), another keyboard icon appears in your systray. Open the SCIM setup panel from there and disable unnecessary input methods. The configurations will be written into
| ||
If you use KDE, you may prefer using skim as the default panel. It uses the same GUI style as other KDE applications. To do so, you need to take the following steps only once after installation.
If SCIM is running, kill it first with the following command.
$ killall scim-launcher |
Make sure the SCIM keyboard icon has disappeared, then issue:
$ scim-panel-kde -d |
A different icon will show up in your systray. Open the configuration panel from there and select scim-panel-kde for 'Panel Program' and kconfig for 'Config Module' in Global Settings > General SCIM. Next time you start KDE, skim will start automatically with scim-launcher-daemon.
The package (skim) is available from contrib. For more details, please refer to The Skim Handbook.
(This section does not apply to uim-0.4.6 which provides GUI setup tools.)
You can add your own definitions to ~/.uim. Here are some examples.
Toggle Hiragana/ASCII input mode with Ctrl+l or Ctrl+L instead of Shift+Space.
(define-key generic-on-key? '("<Control>l" "<Control>L"))
(define-key generic-off-key? '("<Control>l" "<Control>L"))
|
Select a next candidate with Space and a previous candidate with x, disabling Down/up arrows which are not very intuitive if you use horizontal lookup window.
(define-key generic-next-candidate-key? '(" " "<Control>n" "<Control>N"))
(define-key generic-prev-candidate-key? '("x" "<Control>p" "<Control>P"))
|
Bring up a next/previous group of candidates with Period/Comma instead of Page Down/Page Up.
(define-key generic-next-page-key? ".") (define-key generic-prev-page-key? ",") |
Show segment separators. Disabled if the value is #f.
(define anthy-show-segment-separator? #t) |
Specify a sign to use for the segment separator.
(define anthy-segment-separator "|") |
Adjust the maximun number of candidates to be shown at a time.
(define anthy-nr-candidate-max 5) |
Default settings are written in /usr/share/uim/generic-key.scm and
For some reason, dead keys would not work in Qt applications when XIM (X Input Method) was running. As a result, it was impossible to type accented characters that were not mapped to a key in the middle of writing in Japanese or Chinese. I am glad that I can write in the past tense here!
SCIM has solved this longstanding problem too by implementing the full dead key support in its library. Thanks to this improvement, dead keys on your keyboard work as expected in Mandrakelinux 10.1, whether XIM is running or not. You can use them in the ASCII mode of input methods as well.
As far as I know, most Asian languages require a special input method, but there seem to be many European languages that you will be able to type by just adding some non-English characters and/or dead keys to your keyboard.
Xmodmap is the file to edit to realize it. You can have a look at many different xmodmaps in /usr/share/xmodmap (the files are provided by gnome-applets). Make a copy of the xmodmap of your keyboard and customize it to your needs. It may be a good idea to imitate, to some extent, the standard layout for the language that you want to type.
Each key is defined like this.
keycode 32 = o O oslash Ooblique |
In order to use characters in the second group, ø and Ø here, you need to define 'Mode_switch' and 'ISO_Next_Group' in your xmodmap. 'Mode_switch' enables the second group temporarily while you hold down the key whereas 'ISO_Next_Group' makes a sticky switching. You can find out keycodes using $ xev. The tool is included in the X11R6-contrib package.
When you finish editing the file, save it as myxmodmap or whatever you like. The following command enables it instantly.
$ xmodmap myxmodmap |
I made two xmodmaps to type French on a QWERTY keyboard. One is for standard US keyboards. The other is for my Japanese keyboard which has 109 keys. This one, with fourteen dead keys, supports the ISO-8859-2 charset, so it is possible to type East European languages such as Czech, Polish and Hungarian as well. I also made a script and put it in ~/.kde/Autostart so that I can use my own keyboard layout immediately after login.
Some people may prefer to use the compose key (Multi_key) to enter accented characters, but dead keys are much easier to use for me. I have most frequently used dead keys mapped to keycode 34 and 48 (originally @ and colon on my Japanese keyboard) as follows.
keycode 34 = dead_grave dead_acute dead_cedilla keycode 48 = dead_circumflex dead_diaeresis dead_tilde |
The mechanism of dead keys is simple. It works like this.
Press the key # 48 first, then type e, it gives ê (ecircumflex).
Press the key # 48 first, then type E (Shift+e), it gives Ê (Ecircumflex).
Press the key # 48 while holding down Shift, then type i, it gives ï (idiaeresis).
Press the key # 48 while holding down Shift, then type I, it gives Ï (Idiaeresis).
Press the key # 48 while holding down Mode_switch, then type n, it gives ñ (ntilde).
Press the key # 48 while holding down Mode_switch, then type N, it gives Ñ (Ntilde).
The first version of scim-anthy was made available to the public on the 29th November, 2004. It comes from a new project started with an aim to make Japanese IMEngines for SCIM. It works directly with SCIM, as oppposed to UIM's which require a wrapper in between, and provides a GUI configuration tool integrated in the SCIM setup panel. You can learn and customize all key sequences in there.
The RPM package is not available for Mandrakelinux 10.1, but it will be included in 10.2 as the default IM for Japanese along with UIM's. Other IMEngines such as scim-prime are also planned. You will have more freedom of choice! Add the link to the project page to your bookmarks and keep an eye on it. ;)
For more details about scim-anthy, please refer to SCIM-anthy: getting started.
Qt-immodule is under development with the aim of improving the input method support in Qt applications. It is said that the old XIM will be replaced by Qt-immodule in the future. Visit their homepage and find out what is going on.
19th July, 2004 by Yukiko BANDO --- Most recently updated: 20th February, 2005