poniedziałek, 1 lutego 2010

Japanese input in KDE 4

Typing japanese characters (hiragana,katakana and kanji) is a bit tricky when your default locale is other than jp_JP. This is because default input method for pl_PL points to XIM.

This can be changed with im-switch. First we need to install packages related to our wanted input method. I'm using uim since ibus is a little bit buggy.

sudo apt-get install uim uim-qt uim-anthy anthy

I can't really say much about uim configuration it's really easy, just run uim-pref-qt4 and configure it to fit your needs.

Now that we have input method installed we can proceed to next step. Run:

im-switch -v -z pl_PL -c

Substitute pl_PL for the locale you are using. The output should be similar to:

There are 10 candidates which provide IM for /home/quintasan/.xinput.d/pl_PL:

Selection Alternative

-----------------

1 default

2 default-xim

3 ibus

4 ibus-kde

5 none

6 th-xim

* 7 uim

8 uim-systray

9 uim-toolbar

10 uim-toolbar-qt

System wide default for pl_PL (or all_ALL) locale is marked with [+].


Press enter to keep the current selection[*], or type selection number:


Press the number corresponding to your preffered input method. In my case it was 7. Now you are almost ready to go with few things left. We need to run uim-toolbar-qt4 on KDE startup. Assuming everyone uses KDE SC 4.3 go to System settings, Advanced tab and Autostart. There in Desktop files add uim-toolbar-qt4. Next time you will launch your desktop you will get this nice bar:

To check if it is working please change your input method using the keyboard shortcut which can be changed in uim-pref-qt4 (I use CTRL+Space) and it should look like this if everything went fine.

Well, you can try testing it somewhere, Konsole for example. See it in action below :)



1 komentarze:

  1. All you should need to do is install the Japanese language pack and activate iBus. As far as I know, UIM is deprecated.

    In Ubuntu with Gnome, it's in "Administration/Language support". Choose "iBus" input method, click "install/remove languages" and check the "Japanese" checkbox.

    I'm sure there's an equivalent way to do it under Kubuntu and Xubuntu too.

    OdpowiedzUsuń