个人工具

UbuntuHelp:JapaneseInput

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月24日 (四) 10:58的版本 (新页面: {{From|https://help.ubuntu.com/community/JapaneseInput}} {{Languages|UbuntuHelp:JapaneseInput}} '''Works well on Dapper too.''' This method uses uim and its anthy plugin. == Installing ...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

Works well on Dapper too.

This method uses uim and its anthy plugin.

Installing the packages

Either use the Synaptic Package Manager (System> Administration menu) to install the following packages or type the lines in a terminal:

sudo apt-get install uim-applet-gnome uim-xim uim-anthy uim-gtk2.0

Normally, all the necessary dependencies should be pulled by the package manager, including the im-switch utility.

Note: you need to have the UniversePackages repository configured.

At this point, the system is ready to input japanese if you log in a Japanese session. If you don't want to be able to input Japanese in other language sessions, you can skip the next section and directly go to the using the uim applet section.

Setting the input method

But if you want to type in Japanese from an other language session (this is quite the usual case), you can use the im-switch utility to set the input method for only your account or all the users.

In a terminal, type the following:

im-switch -s uim_anthy

Note: This will not work in edgy or above, because the uim_anthy script is missing due to a packaging bug. To work around, download the dapper-package and then type the following in a terminal in the directiory where you saved the package:

dpkg -x uim-anthy_1.0.0-1ubuntu1_i386.deb uim-package
sudo cp uim-package/etc/X11/xinit/xinput.d/uim_anthy /etc/X11/xinit/xinput.d/uim_anthy

It will set the default input method for your user account and you current language, but you can set it for a given language session. For example, you could use:

im-switch -z fr_FR -s uim_anthy

to associate the uim-anthy input method to the French session of your account.

uim allows you to type traditionally, so you can also launch im-switch as administrator to set the default input method for all the users without any side effect:

sudo im-switch -s uim_anthy

Note that user settings prevail over the system ones, so a user you can always override the default input method.

Using the uim applet and testing

Now you can just log out and log back into the desktop and add the applet named Uim applet on one of your panels (Right click on the panel> Add to panel...).

To try out inputting Japanese, launch the Gedit text editor. At this point, the selected GTK input method should be uim. You can check that right-clicking on the text component and just hovering over the Input Methods item to check uim is selected. If it's not, you can always set it from there.

Type something - it should be ordinary roman text. Press Shift-Space, however, and type "watashi". It should come out as Hiragana "わたし" (it is Japanese for "I"). If you have the panel applet in the panel, it should change to reflect that you are typing Hiragana. Press Return to "fix" the word, or press Space to convert it to a Kanji (you want "私"). If you got the wrong Kanji, press Space again to get a selection to choose from. Once you've got the right one, press Return. To type ordinary roman text again, just press Shift-Space once more.

Notice how the applet display change when you switch of input type. You're typing Japanese!

What's next?

Now you can check the settings in the applet to find out more about the different keys you can type to have more control over the input.

I suggest to also try the new Language selector tool (System> Administration menu) to add the writing aids for the Japanese such as the dictionary.