Difference between revisions of "Localization/Japanese"

From ArchWiki
Jump to navigation Jump to search
m (Sans-serif: misspelling)
(update Pkg/AUR templates)
(Tag: wiki-scripts)
 
(32 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[[category:Internationalization]]
+
[[Category:Localization]]
 +
[[ja:国際化]]
 
{{Related articles start}}
 
{{Related articles start}}
 
{{Related|Internationalization}}
 
{{Related|Internationalization}}
 +
{{Related|Input Japanese using uim}}
 
{{Related articles end}}
 
{{Related articles end}}
  
This document provides instructions on how to set up a Japanese language environment on an Arch linux installation. This document will not cover setting up Japanese input on the console.  
+
This article describes how to set up a Japanese language environment. It does not cover setting up Japanese input on the console.  
  
 
==Fonts==
 
==Fonts==
  
''see also [[Fonts]] and [[Font configuration]] for configuration or more detail.''
+
''See also [[Fonts#Japanese]] and [[Font configuration]] for configuration or more detail.''
  
 
To use any Japanese input method, you need to have Japanese fonts installed.
 
To use any Japanese input method, you need to have Japanese fonts installed.
Line 16: Line 18:
 
==== Sans-serif  ====
 
==== Sans-serif  ====
 
* [https://github.com/adobe-fonts/source-han-sans adobe-source-han-sans] || {{Pkg|adobe-source-han-sans-jp-fonts}} or {{Pkg|adobe-source-han-sans-otc-fonts}}
 
* [https://github.com/adobe-fonts/source-han-sans adobe-source-han-sans] || {{Pkg|adobe-source-han-sans-jp-fonts}} or {{Pkg|adobe-source-han-sans-otc-fonts}}
: An open source OTF fonts developed by Adobe.
+
: Open-source OTF fonts developed by Adobe.
  
 
==== Serif (and Sans-serif) ====
 
==== Serif (and Sans-serif) ====
Line 22: Line 24:
 
: An open source OTF font set including sans-serif (Gothic) and serif (Mincho) glyphs provided by Information-technology Promotion Agency, Japan (IPA).
 
: An open source OTF font set including sans-serif (Gothic) and serif (Mincho) glyphs provided by Information-technology Promotion Agency, Japan (IPA).
  
If you want to show [http://en.wikipedia.org/wiki/2channel_Shift_JIS_art 2channel Shift JIS art] properly, use one of the following fonts:
+
If you want to show [[wikipedia:2channel_Shift_JIS_art|2channel Shift JIS art]] properly, use one of the following fonts:
* ipamona font (AUR: {{AUR|ttf-ipa-mona}})
+
* ipamona font (AUR: {{AUR|ttf-ipa-mona}}{{Broken package link|{{aur-mirror|ttf-ipa-mona}}}})
 +
* Mona font (AUR: {{AUR|ttf-mona}})
 
* Monapo font (AUR: {{AUR|ttf-monapo}})
 
* Monapo font (AUR: {{AUR|ttf-monapo}})
  
 
== Locale ==
 
== Locale ==
  
''See [[locale]] for detail''
+
''See [[locale]] for details.''
  
 
You should have {{ic|ja_JP.UTF-8}} enabled in {{ic|/etc/locale.gen}}.
 
You should have {{ic|ja_JP.UTF-8}} enabled in {{ic|/etc/locale.gen}}.
  
==Input in Xorg==
+
== Input methods ==
  
===Input Method Framework===
+
The following [[input method]] (IM) engines are available for Japanese:
  
Input method (IM) frameworks act as frontends to various input methods and libraries, allowing the user to switch between different languages with ease.
+
{| class="wikitable"
 +
! Back-end !! [[Fcitx]] !! [[IBus]] !! [[SCIM]] !! [[uim]] !! [[gcin]] !! {{AUR|hime-git}}
 +
|-
 +
! [[#Anthy|Anthy]]
 +
| {{Pkg|fcitx-anthy}} || {{Pkg|ibus-anthy}} || {{AUR|scim-anthy}} || built-in || built-in || built-in
 +
|-
 +
! [[#libkkc|libkkc]]
 +
| {{Pkg|fcitx-kkc}} || {{Pkg|ibus-kkc}} || {{-}} || {{-}} || {{-}} || {{-}}
 +
|-
 +
! [[Mozc]]
 +
| {{Pkg|fcitx-mozc}} || {{AUR|ibus-mozc}} || {{-}} || {{AUR|uim-mozc}} || {{-}} || {{-}}
 +
|-
 +
! [[#SKK|SKK]]
 +
| {{Pkg|fcitx-skk}} || {{Pkg|ibus-skk}} || {{-}} || built-in || {{-}} || {{-}}
 +
|}
  
You can use the following frameworks:
+
=== Anthy ===
* [[Fcitx]]
 
* [[IBus]]
 
* [[uim]]
 
  
See each articles for detail.
+
[[Wikipedia:Anthy|Anthy]] can convert Hiragana to Kanji. While Anthy is supported by all IM frameworks, it is effectively dead (its last release was 2009).[https://osdn.net/projects/anthy/]
  
{{Note|[[Smart Common Input Method platform|SCIM]] is dead project. You should not use it.}}
+
[[Install]] {{Pkg|anthy}} and the engine for your framework.
  
===Input method===
+
=== libkkc ===
  
====Mozc====
+
[https://github.com/ueno/libkkc libkkc] ({{Pkg|libkkc}}) provides a converter from Japanese Kana-string to Kana-Kanji-mixed-string. It was named after kkc.el in GNU Emacs, a simple Kana Kanji converter, while libkkc tries to convert sentences in a bit more complex way using N-gram language models. It is developed by a Red Hat engineer.
  
''Available IM Frameworks: Fcitx, IBus, uim''
+
[[Install]] the engine for your framework.
  
''See [[Mozc]]''
+
=== Mozc ===
  
[http://code.google.com/p/mozc/ Mozc] is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux which originates from [http://www.google.com/intl/ja/ime/ Google Japanese Input].
+
[[Mozc]] is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux which originates from [http://www.google.com/intl/ja/ime/ Google Japanese Input].
  
Custom package {{AUR|mozc-ut}} comes with [http://www.geocities.jp/ep3797/mozc_01.html Mozc UT dictionary]. The dictionary adds over 350,000 words into original.
+
Custom package {{AUR|mozc-ut2}} comes with [http://www.geocities.jp/ep3797/mozc_01.html Mozc UT dictionary]. The dictionary adds over 350,000 words into original.
  
====libkkc====
+
See the article for the installation procedure.
  
''Available IM Frameworks: Fcitx, IBus''
+
=== SKK ===
  
[https://bitbucket.org/libkkc/ libkkc] provides a converter from Japanese Kana-string to Kana-Kanji-mixed-string. It was named after kkc.el in GNU Emacs, a simple Kana Kanji converter, while libkkc tries to convert sentences in a bit more complex way using N-gram language models. It is developed by a Red Hat engineer.
+
[https://github.com/ueno/libskk SKK] (Simple Kana to Kanji conversion program) is a Japanese input method on Emacs. It was designed by Dr. Masahiko Sato (Professor Emeritus, Kyoto University) (old link) and created in 1987. A unique feature of SKK is that it converts words one by one (single-word conversion), without analyzing syntax or grammar.
  
Install {{Pkg|fcitx-libkkc}}{{Broken package link|package not found}} (for Fcitx) or {{Pkg|ibus-libkkc}}{{Broken package link|package not found}} (for IBus).
+
[[Install]] the SKK dictionaries ({{Pkg|skk-jisyo}}) and the engine for your framework.
  
====SKK====
+
=== Google CGI API for Japanese input ===
  
''Available IM Frameworks: Fcitx, IBus, uim''
+
''Available IM frameworks: uim''
 
 
[http://openlab.jp/skk/index.html SKK] (Simple Kana to Kanji conversion program) is a Japanese input method on Emacs. It was designed by Dr. Masahiko Sato (Professor Emeritus, Kyoto University) (old link) and created in 1987. A unique feature of SKK is that it converts words one by one (single-word conversion), without analyzing syntax or grammar.
 
 
 
Install {{Pkg|skk-jisyo}} and {{Pkg|fcitx-skk}} (for Fcitx) or {{Pkg|ibus-skk}} (for IBus). uim supports SKK itself.
 
 
 
==== Google CGI API for Japanese input ====
 
 
 
''Available IM Framewworks: uim''
 
  
 
[http://www.google.co.jp/ime/cgiapi.html Google CGI API for Japanese Input] (Google-CGIAPI-Jp) is CGI service to provide Japanese conversion on the Internet by Google. It can be used on [http://www.google.com/transliterate web browser]. Its conversion engine seems to be equivalent to Google Japanese Input, so conversion quality is probably better than Mozc.
 
[http://www.google.co.jp/ime/cgiapi.html Google CGI API for Japanese Input] (Google-CGIAPI-Jp) is CGI service to provide Japanese conversion on the Internet by Google. It can be used on [http://www.google.com/transliterate web browser]. Its conversion engine seems to be equivalent to Google Japanese Input, so conversion quality is probably better than Mozc.
Line 85: Line 91:
 
You can use it via uim. Choose "Google-CGIAPI-Jp" on uim-im-switcher-gtk/gtk3/qt4 or uim-pref-gtk/gtk3/qt4.
 
You can use it via uim. Choose "Google-CGIAPI-Jp" on uim-im-switcher-gtk/gtk3/qt4 or uim-pref-gtk/gtk3/qt4.
  
====Anthy====
+
== See also ==
  
Anthy is factually dead project.
+
* [[Gentoo:How to read and write in Japanese]]

Latest revision as of 07:22, 6 April 2019

This article describes how to set up a Japanese language environment. It does not cover setting up Japanese input on the console.

Fonts

See also Fonts#Japanese and Font configuration for configuration or more detail.

To use any Japanese input method, you need to have Japanese fonts installed.

Recommended Japanese fonts are as follows.

Sans-serif

Open-source OTF fonts developed by Adobe.

Serif (and Sans-serif)

An open source OTF font set including sans-serif (Gothic) and serif (Mincho) glyphs provided by Information-technology Promotion Agency, Japan (IPA).

If you want to show 2channel Shift JIS art properly, use one of the following fonts:

Locale

See locale for details.

You should have ja_JP.UTF-8 enabled in /etc/locale.gen.

Input methods

The following input method (IM) engines are available for Japanese:

Back-end Fcitx IBus SCIM uim gcin hime-gitAUR
Anthy fcitx-anthy ibus-anthy scim-anthyAUR built-in built-in built-in
libkkc fcitx-kkc ibus-kkc
Mozc fcitx-mozc ibus-mozcAUR uim-mozcAUR
SKK fcitx-skk ibus-skk built-in

Anthy

Anthy can convert Hiragana to Kanji. While Anthy is supported by all IM frameworks, it is effectively dead (its last release was 2009).[1]

Install anthy and the engine for your framework.

libkkc

libkkc (libkkc) provides a converter from Japanese Kana-string to Kana-Kanji-mixed-string. It was named after kkc.el in GNU Emacs, a simple Kana Kanji converter, while libkkc tries to convert sentences in a bit more complex way using N-gram language models. It is developed by a Red Hat engineer.

Install the engine for your framework.

Mozc

Mozc is a Japanese Input Method Editor (IME) designed for multi-platform such as Chromium OS, Windows, Mac and Linux which originates from Google Japanese Input.

Custom package mozc-ut2AUR comes with Mozc UT dictionary. The dictionary adds over 350,000 words into original.

See the article for the installation procedure.

SKK

SKK (Simple Kana to Kanji conversion program) is a Japanese input method on Emacs. It was designed by Dr. Masahiko Sato (Professor Emeritus, Kyoto University) (old link) and created in 1987. A unique feature of SKK is that it converts words one by one (single-word conversion), without analyzing syntax or grammar.

Install the SKK dictionaries (skk-jisyo) and the engine for your framework.

Google CGI API for Japanese input

Available IM frameworks: uim

Google CGI API for Japanese Input (Google-CGIAPI-Jp) is CGI service to provide Japanese conversion on the Internet by Google. It can be used on web browser. Its conversion engine seems to be equivalent to Google Japanese Input, so conversion quality is probably better than Mozc.

Note: This service sends/receives preedits and candidates as plain text (as of 2012-09).

You can use it via uim. Choose "Google-CGIAPI-Jp" on uim-im-switcher-gtk/gtk3/qt4 or uim-pref-gtk/gtk3/qt4.

See also