Entering Japanese Text (or any other language) in Ubuntu 10.10

“I need to write an email in Japanese, but all I have is an English QWERTY keyboard. What can I do?”

Situations like this arise. Your Japanese pen pal seeks your advice, but he can only read Japanese. You want to reply in his langauge, so when typing emails or text, is there any way to enter Japanese characters?

Ubuntu, as well as many other Linux distributions, has excellent multilingual support. It is possible to compose an email or write text using the characters in any language so native speakers can read it. The key to doing this is installing the target language on the system and finding a way to enter characters from an English QWERTY keyboard.

While an English system and Japanese is used in this example, the same principles apply to any other locale and language.


1. Install Japanese language support

System > Administration > Language Support

This opens the Language & Text dialog.

Click the Install/Remove Languages button to open the Installed Languages dialog. This lists all available languages. To install one, click the language’s corresponding checkbox. Choose ibus from the Keyboard method input system dropdown list.

Make sure to check the Extra Fonts and Input methods checkboxes so the required fonts for displaying the new language are installed. Click Apply Changes, and the chosen language will be installed from the repository.

2. Start ibus

We cannot enter Japanese text yet, so go to System > Preferences > Keyboard Input Methods to open IBus Preferences. If a message dialog appears stating that IBus has not yet been started, Click Yes to start it and continue.

(In the top panel, the Indicator Applet will show a small keyboard icon  to show IBus is active.)

The IBus Preferences dialog appears.

3. Select the Input Method

Go to the Input Method tab and choose Japanese > Anthy from the Select an input method dropdown list. Click the Add button to add it to the list.

4. Customize

That’s it! Japanese text input is ready for action. But before closing the IBus Preferences, go to the General tab and look and the Keyboard Shortcuts.

The Enable or disable text field shows an important key combination: Ctrl + Space. Alt+Shift_L switches among multiple languages, but in this case, Japanese is the only installed input method, so it has no effect.

In the Show language panel, choose When active from the dropdown list. Anthy provides a language bar that is useful for learning how to use Anthy.

Choosing When active makes the language bar appear when Anthy is enabled and removes it during normal text entry to reduce desktop clutter.

Close the dialog.

5. Setting Hiragana and Katakana Keyboard Shortcuts

Before leaving, let’s set two key combinations to make life easier. When typing Japanese, we want a way to quickly switch between the Hiragana and Katakana syllabaries. Clicking the the kana icon in the language panel works, but keyboard shortcuts are much quicker because they keep the hands on the keyboard.

Press Ctrl+Space to activate Japanese input. The language panel should appear somewhere on the desktop.

In the language panel are a series of icons. Click the blue “i” icon  to open the Setup – IBus-Anthy dialog. This customizes Anthy for Japanese text.

Go to the Key Binding tab and find hiragana_mode and katakana_mode in the list. This is where key assignments are customized.

Notice that hiragana_mode and katakana_mode are set to []. This means that there are no key combinations assigned to activate them. We want to assign shortcuts to them, so double-click katakana_mode and a new dialog appears.

Choose a unique key combination for Katakana by entering the key letter in the Key Code box and checking the Alternate and Control checkboxes. Any non-conflicting combination is fine as long as it is easy to remember. Click Add and OK when done.

Do the same for Hiragana using its own key combination.

Further settings may be changed later, but for now, this is plenty. Click OK to close the Setup dialog and get ready to type Japanese text!

Entering Japanese Text

This is easy and consistent. Japanese text may be combined with default system text within the same text file or email. When ready to enter Japanese text, follow these steps:

1. Place the cursor inside any text field or input box where text is normally typed.

2. Press Ctrl+Space to activate Anthy text input. The keyboard icon in the panel changes to a yellow crown icon , and the language panel should appear along with options for Japanese text (or options specific to the chosen language).

3. Type in Japanese. Pressing the space bar will show a list of relevant words to resolve homonyms.

4. Press Enter to complete a word.

5. Press Ctrl+Space to turn off Japanese text entry and switch back to regular input. The crown icon reverts to a keyboard icon.

More Details About Typing in Japanese

Most likely, only an English keyboard is available, so type Japanese words in romaji. While this might not be the best method, it helps understand how Anthy works at first.

Romaji is an English spelling of a Japanese word. (Read Romanization of Japanese for more information.) For example, the word Kanji, referring to Chinese characters, is written as かんじ in hiragana. (か = ka, ん = n, じ = ji). To make the Japanese characters かんじ appear, type kanji using the roman letters on the keyboard while in Japanese input mode.

The default hiragana characters かんじ will appear during typing along with an underline to show that all characters being typed are part of the same word. When finished, press the Enter key on the keyboard to halt input for that word. The underline disappears.

Japanese input is still active, so all further typing will be interpreted as more Japanese text starting with another word. Press Enter after each word to complete it. When finished entering Japanese text, press Ctrl+Space to turn it off and return to the default input method of the system.

The underline shows which characters belong to the same Japanese word. This is important because the Japanese language possesses many homonyms.

Almost all Japanese characters require typing two letters before a single Japanese character appears. The first character will be a Latin character to show what key was just pressed, but the second character (a vowel) will complete the letter and replace it with the Hiragana or Katakana character. ん is the exception.

Use the Backspace and Delete keys to delete typos.

Entering Katakana

Remember the Katakana shortcut we set earlier? Press Alt+Ctrl+k to activate the Katakana alphabet and type using the same method. Katakana characters will appear instead of Hiragana. To switch back to Hiragana, enter the Hiragana shortcut Alt+Ctrl+h. Or, click the kana あ icon in the language panel to switch syllabaries.

Entering Kanji

Kanji are Chinese characters. Before pressing Enter to complete a word, press the space bar. A list of possible spellings in Hiragana, Katakana, and Kanji will appear. The exact choice depends upon the word being typed. This is useful for resolving homonyms.

Use the up and down arrow keys or space bar to cycle through the available words, and press Enter to use the highlighted word. This replaces the typed Japanese text with the chosen Kanji. Kanji is not entered directly; it is selected from a list while typing.

Gedit Example

Open gedit or any other text editor to test default English characters and Japanese characters typed in the same text file using an English keyboard. First, enter following message using normal input:

I am John Smith.
The pencil is on the desk.

Translated into Japanese, the above message reads like this in romaji:

watashi wa jon sumisu desu.
enpitsu wa tsukue no ue ni arimasu.

However, real Japanese writing and the Japanese people do not use romaji. They use a combination of Hiragana, Katakana, and Kanji, but to make those alphabets appear using an English keyboard, we need to type in romaji. So, switch to Japanese mode (Ctrl+Space) and enter the above without spaces. In place of each space, press Enter on the keyboard. The result should look like this:


If the results differ, then do not be alarmed since this has more to do with a knowledge of Japanese grammar and spelling (along with keyboard dexterity) than computing skills in order to produce it correctly. This is a useful example because it combines the three alphabets, so let’s walk through each word to understand its construction. Press Enter after each word to complete it.

Line 1: わたしはジョンスミスです。

わたしEnter watashi in Hiragana mode.

は  This is the topic particle “wa,” but enter “ha” on the keyboard.

ジョンスミス John Smith. Switch to Katakana and type jon sumisu.

です。Means “am” in this context. Enter in Hiragana along with the period. Press the period key on the keyboard to enter a period. (Japanese periods are actually small circles.)

Line 2: 鉛筆は机の上にあります。

鉛筆 Pencil. Start by typing enpitsu in either Hiragana or Katakana. The text should look like えんぴつ or エンピツ, but before pressing Enter, press the space bar until the Kanji 鉛筆 appears. When it does, press Enter to complete the word in its Kanji form.

Another topic particle “wa.” Enter “ha” and press Enter.

Desk. Created the same way as pencil. Enter つくえ and press the space bar until 机 appears. Press Enter.


Another Kanji meaning “top.” Enter うえ (ue) and press space until the Kanji 上 appears.

A particle meaning “on.”

あります。 A word indicating existence for inanimate objects like pencils. Leave it as Hiragana. If entered as Katakana, press the space bar to change it into its Hiragana form. Press Enter.

Sidenote: Notice that there are no spaces between Japanese words. This is normal because Japanese words run together. In text like this, words are written and read from left to write just like English sentences.

Write this way: 鉛筆は机の上にあります。
Do not write like this: 鉛筆 は 机の上 に あります。

About Japanese Keyboards

All of the added key combinations, shortcuts, and alphabet switching leads to extra typing. After all, it requires two key presses to make one Japanese letter. Is there an easier way?

Yes, but it requires using a Japanese keyboard, which follows a different layout than an English QWERTY keyboard. The biggest benefit of using one allows Hiragana and Katakana letters to be entered directly with a single key press instead of two as required on a QWERTY keyboard.



If a Japanese keyboard is unobtainable, an existing QWERTY keyboard can be mapped exactly like a real Japanese keyboard, but the letters printed on the keys will no longer be useful. In this case, sticker overlays help.

What Is This Good For?

This is primarily useful for those who need to type Japanese text. While Japanese is used as an example, the same arrangement is possible for other languages.

Text entry is possible in most programs that have multilingual text entry support. Writing Emails in Japanese (Mozilla Thunderbird 12 cannot handle Japanese input or Anthy), entering search queries in a search engine, and finding products on www.amazon.co.jp using Japanese text are a few of the possibilities. Entering Japanese text into a search engine is particularly fun because it produces results not possible using English.

Email Encryption

For those who enjoy encrypting email, Japanese text encrypts with GPG and PGP just like Latin characters. Simply compose a Japanese email and encrypt it like any other email.


English might be the language of the Internet, but it helps to know how to set up a computer and type in another language.

Linux distributions, such as Ubuntu, are designed with an international audience in mind, so this makes the process easier than ever.

The biggest challenge involves learning another language to communicate fluently.


, , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: