Japanese Input Method on Fedora 12

by John McGehee on March 12, 2010

This article describes how to set up Japanese text input with Fedora 12.  I’ve used Japanese text input since RHEL 3, and now multilingual text input even easier. An earlier, similar article describes Japanese text input on Fedora 11.

Japanese test display works by default. The new fonts in Fedora 12 are beautiful. If a Japanese language web site does not display properly in Firefox, try adjusting the encoding with View > Character Encoding > Japanese(EUC-JP) or View > Character Encoding > More Encodings > East Asian > Japanese (Shift-JIS) .

For information on how to install Japanese language input on other Linux distributions and other Fedora versions, see Scott Robbins’ authoritative guide, Inputting Japanese text in Linux and some BSDs. I have invited Scott to add this text to his guide when he gets the chance.

Installing the Input Method

Start by installing Japanese input method packages:

yum install scim-lang-japanese

Then, set up your preferences with System > Preferences > Input Method. This will bring up the IM Chooser dialog:

  • iBus Preferences form Select Use IBus
  • Click on Input Method Preferences, and choose the Input Method tab. From the Select an input method list, choose Japanese > Anthy, and click Add.
  • Similarly choose and Add the other languages you want to input.  I write Chinese from time to time, so I added Chinese-Pinyin.
  • Use the Up and Down buttons to arrange the order in which the languages appear when you hit the Alt+Shift+L hot key.  You will want the language you use most at the top of the list.
  • If you are the first user on the machine to enable IBus,
    • Save your unsaved work in other applications and select Log Out
    • Log in again
  • If another user has previously enabled IBus on this machine, you will not need to log out.  Just select Close.

Now give it a try:

  • Put your cursor in a text entry window that handles international input.  A text entry field on a web page or an OpenOffice document can do this.
  • Hit Ctrl+Space to switch from English to the first input method (Japanese in my case).  A small window will appear in the lower right corner of your display. You use this to control the input method.
  • Type something in Japanese
  • If you added another input method, hit the Alt+Shift+L hot key. Now you can type in the second language (Chinese for me).
  • Return to English input with Ctrl+Space

At last I can directly express in Chinese how good IBus is, 非常好, instead of entering how much I like it in Japanese, 非常に好きです, and then editing it into Chinese.

Changing Your User Language

If you really want to go native, add the following to the .bash_profile file in your home directory:

export LANG=ja_JP.UTF-8   # Read the warning below first

Log out and log in again, and everything is in Japanese.

Don’t try this at home unless you can actually read Japanese. In particular, you will be asked if you want to change your file names to Japanese. Give the wrong answer, and your Desktop/ directory will be renamed デスクトップ/. Are you already staring at the dialog that is threatening to do this? Select 古い名前のままにする(K) to keep your current file names.

Changing the Locale

The locale is a big subject, but the most useful setting I have found is the LC_CTYPE environment variable, because it changes the formatting of dates and currency values in OpenOffice. This may be useful if you live in Japan, but prefer to use Linux in English. In the .bash_profile file in your home directory, add the following :

export LC_CTYPE=ja_JP.UTF-8

Log out and log in again, and everything is in English, assuming LANG is no longer set to ja_JP.UTF-8. Open a spreadsheet with Applications > Office > OpenOffice.org Calc. Choose Format > Cells, choose the Numbers tab, and you can see that the Language has changed to Japanese, and the choices for date and currency formats are those customary in Japan.

gwaei Japanese-English Dictionary

Now that you can type both Japanese and English, you will want a dictionary. The gwaei Japanese-English dictionary for Linux works great with Fedora 12.

Note that the gwaei i386 RPM will not work with x86_64 Fedora 12. If you installed the x86_64 version of Fedora 12, just compile gwaei as explained in the installation instructions.


Link to this article at http://www.voom.net/japanese-input-method-fedora (without the 12). As I write new articles for new Fedora versions, this link will always redirect your readers to the latest article.

{ 2 comments… read them below or add one }

daniel mardjuadi August 22, 2010 at 06:09

This article is so useful for me… because there’s no Japanese input in my Wordpress theme…
Thanks so much for sharing ^^

John McGehee September 20, 2010 at 10:13

I’m using Wordpress for this site/blog, and as you say, it works fine.

Leave a Comment

{ 1 trackback }

Previous post:

Next post: