Difference between revisions of "Localization/Korean"

From ArchWiki
Jump to navigation Jump to search
m (style guide에 맞추어 바뀐 제목을 반영했습니다.)
(reformatted the document to approximately follow the internationalization page.)
Line 5: Line 5:
 
{{Related articles end}}
 
{{Related articles end}}
  
This document provides instructions on how to set up Korean input methods on an Arch Linux installation.
+
This document provides instructions on how to set up a Korean language environment in an Arch linux installation. This document will not cover setting up Korean input on the console.  
 
 
You should have a working X11 environment set up before proceeding with the steps below. This guide will not cover setting up Korean input on the console.
 
  
 
==Fonts==
 
==Fonts==
Line 13: Line 11:
 
To use any korean input method, you need to have Korean fonts installed. Install {{aur|ttf-nanum|the nanum family fonts}} or the {{aur|ttf-unfonts-core|Un family fonts}} from the [[AUR]]. If you also want Korean monospaced fonts, install {{aur|ttf-nanumgothic_coding}} from the AUR. Alternatively, if you use the [[Infinality]] patches and have the [[Unofficial user repositories#infinality-bundle-fonts|Infinality-bundle-fonts repository]] enabled, you can install {{ic|ttf-nanum-fonts-ibx}}, {{ic|ttf-nanumgothic-coding-ibx}}, and {{ic|ttf-unfonts-core-ibx}} from the {{ic|infinality-bundle-fonts}} repository. If you want to view and use Yethangul(옛한글), install the {{aur|ttf-unfonts-core|Un family fonts}} and/or the {{aur|ttf-hamchorom-lvt}} fonts.
 
To use any korean input method, you need to have Korean fonts installed. Install {{aur|ttf-nanum|the nanum family fonts}} or the {{aur|ttf-unfonts-core|Un family fonts}} from the [[AUR]]. If you also want Korean monospaced fonts, install {{aur|ttf-nanumgothic_coding}} from the AUR. Alternatively, if you use the [[Infinality]] patches and have the [[Unofficial user repositories#infinality-bundle-fonts|Infinality-bundle-fonts repository]] enabled, you can install {{ic|ttf-nanum-fonts-ibx}}, {{ic|ttf-nanumgothic-coding-ibx}}, and {{ic|ttf-unfonts-core-ibx}} from the {{ic|infinality-bundle-fonts}} repository. If you want to view and use Yethangul(옛한글), install the {{aur|ttf-unfonts-core|Un family fonts}} and/or the {{aur|ttf-hamchorom-lvt}} fonts.
  
==Choose a Korean input method==
+
==locale==
 +
 
 +
See [[Locale (한국어)]]
 +
 
 +
 
 +
==Input in Xorg==
 +
===Choose a Korean input method===
  
 
Input method (IM) frameworks act as frontends to various input methods and libraries, allowing the user to switch between different languages with ease. Frameworks such as [[ibus]], [[UIM|uim]], [[fcitx]] and [[scim]], as well as {{aur|nabi}}, a stand-alone Korean input method, support Korean input. This section will try to help you choose a suitable IM framework.
 
Input method (IM) frameworks act as frontends to various input methods and libraries, allowing the user to switch between different languages with ease. Frameworks such as [[ibus]], [[UIM|uim]], [[fcitx]] and [[scim]], as well as {{aur|nabi}}, a stand-alone Korean input method, support Korean input. This section will try to help you choose a suitable IM framework.
Line 19: Line 23:
 
{{note|Check the issues associated with each input method framework before choosing which one to use.}}
 
{{note|Check the issues associated with each input method framework before choosing which one to use.}}
  
===Current Issues===
+
====Current Issues====
 
;ibus: [[ibus]] is the default input framework of [[Gnome]] and Ubuntu. It is the most widely supported input method framework. As such, you can use ibus for inputting Korean without issue in most applications. However, there are some issues:
 
;ibus: [[ibus]] is the default input framework of [[Gnome]] and Ubuntu. It is the most widely supported input method framework. As such, you can use ibus for inputting Korean without issue in most applications. However, there are some issues:
 
:* As of November 2014, ibus sometimes doesn't recognize user-set hotkeys for IM switching. This means that you may need to click on the ibus systray icon every time to want to switch input methods.
 
:* As of November 2014, ibus sometimes doesn't recognize user-set hotkeys for IM switching. This means that you may need to click on the ibus systray icon every time to want to switch input methods.
Line 33: Line 37:
 
If you have chosen which framework to use, continue with the configuration section.
 
If you have chosen which framework to use, continue with the configuration section.
  
==Configuration==
+
===Configuration===
  
===ibus-hangul===
+
====ibus-hangul====
  
 
See [[ibus]] for information about installing and configuring ibus.
 
See [[ibus]] for information about installing and configuring ibus.
  
===uim-byeoru===
+
====uim-byeoru====
  
 
Follow the instructions in [[User:Isaac914/uim]] to install uim and to get it running.  Return to this section after uim is installed and running as the default input method.
 
Follow the instructions in [[User:Isaac914/uim]] to install uim and to get it running.  Return to this section after uim is installed and running as the default input method.
Line 55: Line 59:
 
If all went properly, you should now be able to use UIM-byeoru to type in Korean.
 
If all went properly, you should now be able to use UIM-byeoru to type in Korean.
  
===scim-hangul===
+
====scim-hangul====
  
 
[[Install]] {{Pkg|scim-hangul}}.  
 
[[Install]] {{Pkg|scim-hangul}}.  
Line 68: Line 72:
 
{{note|The above environment variables differ slightly from the ones recommended in the [[scim]] article. We are adding {{ic|<nowiki>export GTK_IM_MODULE="xim"</nowiki>}} instead of {{ic|<nowiki>GTK_IM_MODULE=”scim"</nowiki>}}. This allows us to input Korean in apps such as Chrome and Chromium (though with issues discussed above), and to use backspace properly in GTK+3 applications such as gedit.}}
 
{{note|The above environment variables differ slightly from the ones recommended in the [[scim]] article. We are adding {{ic|<nowiki>export GTK_IM_MODULE="xim"</nowiki>}} instead of {{ic|<nowiki>GTK_IM_MODULE=”scim"</nowiki>}}. This allows us to input Korean in apps such as Chrome and Chromium (though with issues discussed above), and to use backspace properly in GTK+3 applications such as gedit.}}
  
===fcitx-hangul===
+
====fcitx-hangul====
 
[[Install]] {{Pkg|fcitx-hangul}} and your choice of GUI front-end from: {{Pkg|fcitx-gtk2}}, {{Pkg|fcitx-gtk3}}, {{Pkg|fcitx-qt4}}, {{Pkg|fcitx-qt5}}.  
 
[[Install]] {{Pkg|fcitx-hangul}} and your choice of GUI front-end from: {{Pkg|fcitx-gtk2}}, {{Pkg|fcitx-gtk3}}, {{Pkg|fcitx-qt4}}, {{Pkg|fcitx-qt5}}.  
  
Line 79: Line 83:
 
  export XMODIFIERS=@im=fcitx
 
  export XMODIFIERS=@im=fcitx
  
===nabi===
+
====nabi====
  
 
[[Arch_User_Repository#Installing_packages|Install]] the {{aur|nabi}} package from the AUR.
 
[[Arch_User_Repository#Installing_packages|Install]] the {{aur|nabi}} package from the AUR.
Line 96: Line 100:
 
Once you restart the X session, nabi will autostart by default. The default korean keyboard layout is Dubeolsik(두벌식). If you need a different korean keyboard layout (e.g. Sebeolsik or Dubeolsik Yetgul), click on the system tray icon of nabi, and select a input method from the menu that pops up.
 
Once you restart the X session, nabi will autostart by default. The default korean keyboard layout is Dubeolsik(두벌식). If you need a different korean keyboard layout (e.g. Sebeolsik or Dubeolsik Yetgul), click on the system tray icon of nabi, and select a input method from the menu that pops up.
  
==Tips and Tricks==
+
===Tips and Tricks===
  
===Using the Right alt key to switch input methods===
+
====Using the Right alt key to switch input methods====
 
You can use the right {{ic|Alt}} key (e.g. '한/영키') to switch between Input methods if you are using uim, scim, or nabi. To do this, add the following lines '''after''' the environment variables that start your input method:
 
You can use the right {{ic|Alt}} key (e.g. '한/영키') to switch between Input methods if you are using uim, scim, or nabi. To do this, add the following lines '''after''' the environment variables that start your input method:
  
Line 110: Line 114:
 
Then, in the settings of your input method, add the right {{ic|Alt}} key as a hotkey to switch IMEs. The right {{ic|Alt}} key has been remapped to a non-modifier key called "Hangul". The script above also allows you to use the right {{ic|Ctrl}} key (e.g. '한자키') to activate Hanja input. The right {{ic|Ctrl}} key should also have been remapped to "Hangul_Hanja". Add this key as a Hanja hotkey within the settings of your input method. If adding that to your {{ic|.xprofile}} or {{ic|.xinitrc}} file did not work, create a script containing those four lines and set it to auto execute when your desktop environment starts up.
 
Then, in the settings of your input method, add the right {{ic|Alt}} key as a hotkey to switch IMEs. The right {{ic|Alt}} key has been remapped to a non-modifier key called "Hangul". The script above also allows you to use the right {{ic|Ctrl}} key (e.g. '한자키') to activate Hanja input. The right {{ic|Ctrl}} key should also have been remapped to "Hangul_Hanja". Add this key as a Hanja hotkey within the settings of your input method. If adding that to your {{ic|.xprofile}} or {{ic|.xinitrc}} file did not work, create a script containing those four lines and set it to auto execute when your desktop environment starts up.
  
===Libreoffice===
+
====Libreoffice====
  
 
In some cases, Libreoffice will not take Korean input from any input method. To resolve this issue, try adding {{ic|1=export OOO_FORCE_DESKTOP="gnome"}} to {{ic|.xinitrc}}, {{ic|.xprofile}}, or {{ic|.xsession}}.
 
In some cases, Libreoffice will not take Korean input from any input method. To resolve this issue, try adding {{ic|1=export OOO_FORCE_DESKTOP="gnome"}} to {{ic|.xinitrc}}, {{ic|.xprofile}}, or {{ic|.xsession}}.

Revision as of 00:06, 10 December 2014

This document provides instructions on how to set up a Korean language environment in an Arch linux installation. This document will not cover setting up Korean input on the console.

Fonts

To use any korean input method, you need to have Korean fonts installed. Install ttf-nanumAUR or the ttf-unfonts-coreAUR from the AUR. If you also want Korean monospaced fonts, install ttf-nanumgothic_codingAUR from the AUR. Alternatively, if you use the Infinality patches and have the Infinality-bundle-fonts repository enabled, you can install ttf-nanum-fonts-ibx, ttf-nanumgothic-coding-ibx, and ttf-unfonts-core-ibx from the infinality-bundle-fonts repository. If you want to view and use Yethangul(옛한글), install the ttf-unfonts-coreAUR and/or the ttf-hamchorom-lvtAUR fonts.

locale

See Locale (한국어)


Input in Xorg

Choose a Korean input method

Input method (IM) frameworks act as frontends to various input methods and libraries, allowing the user to switch between different languages with ease. Frameworks such as ibus, uim, fcitx and scim, as well as nabiAUR, a stand-alone Korean input method, support Korean input. This section will try to help you choose a suitable IM framework.

Note: Check the issues associated with each input method framework before choosing which one to use.

Current Issues

ibus
ibus is the default input framework of Gnome and Ubuntu. It is the most widely supported input method framework. As such, you can use ibus for inputting Korean without issue in most applications. However, there are some issues:
  • As of November 2014, ibus sometimes doesn't recognize user-set hotkeys for IM switching. This means that you may need to click on the ibus systray icon every time to want to switch input methods.
uim
uim is a multilingual, cross-platform input method framework. The uim package in the official repositories includes uim-byeoru, the korean module for uim. uim-byeoru works well on most applications (including Google Chrome and Chromium) without issue. opera users, however, may want to avoid uim, as trying to use uim-byeoru in Opera may cause it to crash.
scim
scim, or the Smart Common Input Method platform, is a input method framework for posix-compliant systems. scim-hangul, as of November 2014, has issues with Google Chrome and Chromium web browsers. With the default environment variables, you cannot input Korean in Google Chrome or Chromium. scim also causes problems in Gedit as of November 2014. When the scim-hangul is active, pressing backspace does not work properly. A workaround for both these issues will be explained in the scim configuration section. However, even with this workaround applied, Korean Chrome/Chromium users may find that the preedit string disappears when the spacebar or any other modifier key is pressed. There is currently no known workaround for this issue.
fcitx
Fcitx is another input method framework for posix-compliant systems. Fcitx-hangul has issues with Google Chrome and Chromium. Some users have reported that fcitx only recognizes Google Chrome/Chromium's URL bar as an input window only after their themes have been changed.
nabi
nabiAUR is a standalone Korean input method that is being developed by Choehwanjin. Nabi provides many unique features, such as Yethangul support. If you only need to use Korean and English input, you may want to install nabi. Currently, nabi causes an issue with chromium. When you press the spacebar, the preedit string will be placed after the space, causing your input to look like this: 한 글입력 에문제 가있습니다

If you have chosen which framework to use, continue with the configuration section.

Configuration

ibus-hangul

See ibus for information about installing and configuring ibus.

uim-byeoru

Follow the instructions in User:Isaac914/uim to install uim and to get it running. Return to this section after uim is installed and running as the default input method.

Open the uim preferences window by running :

$ uim-pref-gtk (Or, uim-pref-gtk3/uim-pref-qt4)

Within global settings, check on the Specify default IM checkbox. Then, set Byeoru as default. You may also want to disable input methods that you do not plan on using by clicking on the 'edit' button. If you want to quickly switch between Korean and other languages (other than English), check the enable IM switching by hotkey checkbox, and set a hotkey to switch between enabled IMEs.

When you are done with the global preferences, find Byeoru in the tree menu on the left side of the preferences window. From there, you can set the Korean keyboard layout you want to use (e.g. 3 beol), specify the korean/Hanja dictionary that Byeoru will use, and other miscellaneous settings. Then, click on Byeoru Keybinding 1 in the tree menu. Set the hotkey you want to use to enable/disable Byeoru. Most Korean users use Ctrl+space or shift+space.

Note: If you want to use the right Alt key to switch from Korean to English and vice versa, go to the #Using the Right alt key to switch input methods section.

If all went properly, you should now be able to use UIM-byeoru to type in Korean.

scim-hangul

Install scim-hangul.

Now add the following to the user's .xinitrc, .xprofile, or .xsession:

export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="xim"
export QT_IM_MODULE="scim"
scim -d
Note: The above environment variables differ slightly from the ones recommended in the scim article. We are adding export GTK_IM_MODULE="xim" instead of GTK_IM_MODULE=”scim". This allows us to input Korean in apps such as Chrome and Chromium (though with issues discussed above), and to use backspace properly in GTK+3 applications such as gedit.

fcitx-hangul

Install fcitx-hangul and your choice of GUI front-end from: fcitx-gtk2, fcitx-gtk3, fcitx-qt4, fcitx-qt5.

If you are using KDE, also install fcitx-kcm, in order to have the fcitx configuration integrated into KDE's system settings.

Once fcitx is installed, edit your .xinitrc, .xprofile, or .xsession file to include:

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

nabi

Install the nabiAUR package from the AUR.

If you want the latest version of nabi, run git clone https://github.com/choehwanjin/nabi.git, cd into the cloned git repo, check if you have all the necessary libraries for building nabi by running ./configure, and then run make. When make finishes building the binary, run make install as root.

Once you have finished the installation, add the following to .xprofile, .xinitrc, or xsession:

export XIM=nabi
export XIM_ARGS=
export XIM_PROGRAM="nabi"
export XMODIFIERS="@im=nabi"
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

Once you restart the X session, nabi will autostart by default. The default korean keyboard layout is Dubeolsik(두벌식). If you need a different korean keyboard layout (e.g. Sebeolsik or Dubeolsik Yetgul), click on the system tray icon of nabi, and select a input method from the menu that pops up.

Tips and Tricks

Using the Right alt key to switch input methods

You can use the right Alt key (e.g. '한/영키') to switch between Input methods if you are using uim, scim, or nabi. To do this, add the following lines after the environment variables that start your input method:

~/.xprofile
xmodmap -e 'remove mod1 = Alt_R'
xmodmap -e 'keycode 108 = Hangul'
xmodmap -e 'remove control = Control_R'
xmodmap -e 'keycode 105 = Hangul_Hanja'

Then, in the settings of your input method, add the right Alt key as a hotkey to switch IMEs. The right Alt key has been remapped to a non-modifier key called "Hangul". The script above also allows you to use the right Ctrl key (e.g. '한자키') to activate Hanja input. The right Ctrl key should also have been remapped to "Hangul_Hanja". Add this key as a Hanja hotkey within the settings of your input method. If adding that to your .xprofile or .xinitrc file did not work, create a script containing those four lines and set it to auto execute when your desktop environment starts up.

Libreoffice

In some cases, Libreoffice will not take Korean input from any input method. To resolve this issue, try adding export OOO_FORCE_DESKTOP="gnome" to .xinitrc, .xprofile, or .xsession.