Typing Korean (and Japanese) in Linux

A while back, I wrote a post on typing Japanese in FreeBSD, but since I started learning the Korean language too, alongside Japanese, I decided to revisit the subject.

The default method these days for inputting Japanese or Korean is using SCIM. SCIM is modular, so you can add extra plugins to do things like Japanese-input, Korean-input, Chinese, or whatever language a module exists for. This is largely replaced by IBUS, which does everything SCIM does, only better. However, not every distribution has it yet, so this will cover SCIM installation only. If you use a modern distribution like Ubuntu or Mint, follow their instructions for activating IBUS and adding custom keyboards. It’s far more reliable than SCIM.

When setting up SCIM, you need to simply do the following:

  • Install SCIM and the appropriate modules (Anthy for Japanese, Hangul for Korean). Check your distributions packages, but they should be something like scim-anthy and scim-hangul.
  • Install fonts for Japaense/Korean. Usually this is pre-packaged by your distribution too (e.g. fonts-japanese fonts-korean).
  • Setup the correct environment variables for your account. This is often overlooked.

For the third item, if you're using BASH shell, or another derivative, setup environment variables in .bashrc (or the RC file for your shell derivative) like so:

export XMODIFIERS="@im=SCIM"
export XIM_PROGRAM="/usr/bin/scim -d"
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim

From there you'll need to log out, and log back in. If you open up a browser, or textpad application, you can now toggle SCIM using CTRL+space. You should also see a little keyboard icon somewhere on your screen, especially if using GNOME or KDE (may not appear in other window managers). You may need to enable Anthy or Hangul in SCIM by right-clicking on that keyboard icon and configuring it.

Anyhow, assuming that SCIM is now running and you've got Japanese/Korean input, what do you do?

For Japanese (Anthy), you've usually got a few choices:

The choices are pretty obvious, so you can get started right away, typing something like "sushi", which will appear as すし, and if you hit spacebar after that you, can choice which kanji choice you want, if any.

Korean should be a lot simpler since it only has one alphabet, not two, and only uses Chinese characters rarely (see Wikipedia article on Hanja). So it should be easier to type, right? Nope. That's beacuse there's been many ways to romanize Korean into English, because many sounds in Korean don't have a direct transliteration into English. This means there's many ways to type it on an English keyboard.

Also, as I have observed, different versions of IBUS/SCIM will not have all the same "keyboards" as each other for Korean. The most basic, default keyboard layout available is the 2bul or 2-sided keyboard which is called dubeolsik (두벌식). It takes some learning, but this is probably the one you should learn as it's the most widely available. Even my iPhone's Korean keyboard uses the 2-bul input method.

It is called the "two-sided" keyboard because the consonants are on the left-side, the vowels (including the "y" vowels) are on the right. This website does an awesome job explaning how to use the 2bul keyboard method (the Japanese input page is good too).

Typing Korean in Linux takes more effort up front because you have to learn a new keyboard, unlike the Japanese input which uses romanization, but I found that within 20 minutes I was managing just fine. I typed this page using Linux and can type both 日本語 (Japanese) and 한극어 (Korean) just fine. If you do have a distribution that uses IBUS (e.g. Ubuntu or Mint among others) setting up is even easier.

Compred to 5-10 years ago, when Unicode and multi-lingual support was barely working at all on computers, things have improved a lot. Good luck!

P.S. Just to repeat, I found the Sayjack website to be very useful resource on Asian-languages and technology. Definitely check it out if you have time.

About these ads

About Doug

A fellow who dwells upon the Pale Blue Dot who spends his days obsessing over things like Buddhism, KPop music, foreign languages, BSD UNIX and science fiction.
This entry was posted in Bsd, Japanese, Korean, Language, Linux, Technology. Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s