translated

This commit is contained in:
geekpi 2018-01-12 08:56:29 +08:00
parent 5ac34f0f32
commit 81f285a563
2 changed files with 99 additions and 100 deletions

View File

@ -1,100 +0,0 @@
translating---geekpi
How To Setup Japanese Language Environment In Arch Linux
======
![](https://www.ostechnix.com/wp-content/uploads/2017/11/Setup-Japanese-Language-Environment-In-Arch-Linux-720x340.jpg)
In this tutorial, we will be discussing how to setup Japanese language environment in Arch Linux. In other Unix-like operating systems, it is not a big deal to setup Japanese layout. You can easily choose the Japanese keyboard layout from Settings. However, it is bit difficult under Arch Linux and there is no proper documentation in ArchWiki. If you're using Arch Linux and/or its derivatives like Antergos, Manajaro Linux, follow this guide to use Japanese language in your Arch Linux and its derivatives systems.
### Setup Japanese Language Environment In Arch Linux
First, install the necessary Japanese fonts for viewing Japanese ascii arts properly:
```
sudo pacman -S adobe-source-han-sans-jp-fonts otf-ipafont
```
```
pacaur -S ttf-monapo
```
If you don't have Pacaur installed already, refer [**this link**][1].
Make sure you have commented out (add # to comment out) the following line in **/etc/locale.gen** file.
```
#ja_JP.UTF-8
```
Then, install **iBus** and **ibus-anthy**. For those wondering, iBus is Input method (IM) framework for Unix-like systems and ibus-anthy is the Japanese input method for iBus.
```
sudo pacman -S ibus ibus-anthy
```
Add the following lines in **~/.xprofile** (If it doesn 't exist, create one):
```
# Settings for Japanese input
export GTK_IM_MODULE='ibus'
export QT_IM_MODULE='ibus'
export XMODIFIERS=@im='ibus'
#Toolbar for anthy
ibus-daemon -drx
```
The ~/.xprofile file allows us to execute commands at the beginning of the X user session before the window manager is started.
Save and close the file. Restart your Arch Linux system to take effect the changes.
After logging in to your system, right click on the iBus icon in the task bar and choose **Preferences**. If it is not there, run the following command from Terminal to start IBus and open the preferences window.
```
ibus-setup
```
Choose Yes to start iBus. You will see a screen something like below. Click Ok to close it.
[![][2]][3]
Now, you will see the iBus preferences window. Go to **Input Method** tab and click "Add" button.
[![][2]][4]
Choose "Japanese" from the list:
[![][2]][5]
And then, choose "Anthy" and click Add.
[![][2]][6]
That's it. You will now see "Japanese - Anthy" in your Input Method section.
[![][2]][7]
Then change the options for Japanese input as per your requirement in the Preferences section (Click Japanese - Anthy -> Preferences).
[![][2]][8]
You can also edit the default shortcuts in the key bindings section. Once you made all changes, click Apply and OK. That's it. Choose the Japanese language from iBus icon in the task bar or press **SUPER KEY+SPACE BAR** to switch between Japanese and English languages (or any other default language in your system). You can change the keyboard shortcuts from IBus Preferences window.
You know now how to use Japanese language in Arch Linux and derivatives. If you find our guides useful, please share them on your social, professional networks and support OSTechNix.
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/setup-japanese-language-environment-arch-linux/
作者:[][a]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.ostechnix.com
[1]:https://www.ostechnix.com/install-pacaur-arch-linux/
[2]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]:http://www.ostechnix.com/wp-content/uploads/2017/11/ibus.png ()
[4]:http://www.ostechnix.com/wp-content/uploads/2017/11/iBus-preferences.png ()
[5]:http://www.ostechnix.com/wp-content/uploads/2017/11/Choose-Japanese.png ()
[6]:http://www.ostechnix.com/wp-content/uploads/2017/11/Japanese-Anthy.png ()
[7]:http://www.ostechnix.com/wp-content/uploads/2017/11/iBus-preferences-1.png ()
[8]:http://www.ostechnix.com/wp-content/uploads/2017/11/ibus-anthy.png ()

View File

@ -0,0 +1,99 @@
如何在 Arch Linux 中设置日语环境
======
![](https://www.ostechnix.com/wp-content/uploads/2017/11/Setup-Japanese-Language-Environment-In-Arch-Linux-720x340.jpg)
在本教程中,我们将讨论如何在 Arch Linux 中设置日语环境。在其他类 Unix 操作系统中,设置日文布局并不是什么大不了的事情。你可以从设置中轻松选择日文键盘布局。然而,在 Arch Linux 下有点困难ArchWiki 中没有合适的文档。如果你正在使用 Arch Linux 和/或其衍生产品如 AntergosManajaro Linux请遵循本指南在 Arch Linux 及其衍生系统中使用日语。
### 在Arch Linux中设置日语环境
首先,安装必要的日语字体,以正确查看日语 ASCII 格式:
```
sudo pacman -S adobe-source-han-sans-jp-fonts otf-ipafont
```
```
pacaur -S ttf-monapo
```
如果你尚未安装 pacaur请参阅[**此链接**][1]。
确保你在 **/etc/locale.gen** 中注释掉了(添加 # 注释)下面的行。
```
#ja_JP.UTF-8
```
然后,安装 **iBus****ibus-anthy**。对于那些想知道原因的iBus 是类 Unix 系统的输入法IM框架而 ibus-anthy 是 iBus 的日语输入法。
```
sudo pacman -S ibus ibus-anthy
```
**~/.xprofile** 中添加以下行(如果不存在,创建一个):
```
# Settings for Japanese input
export GTK_IM_MODULE='ibus'
export QT_IM_MODULE='ibus'
export XMODIFIERS=@im='ibus'
#Toolbar for anthy
ibus-daemon -drx
```
~/.xprofile 允许我们在窗口管理器启动之前在 X 用户会话开始时执行命令。
保存并关闭文件。重启 Arch Linux 系统以使更改生效。
登录到系统后,右键单击任务栏中的 iBus 图标,然后选择 **Preferences**。如果不存在,请从终端运行以下命令来启动 iBus 并打开偏好设置窗口。
```
ibus-setup
```
选择 Yes 来启动 iBus。你会看到一个像下面的页面。点击 Ok 关闭它。
[![][2]][3]
现在,你将看到 iBus 偏好设置窗口。进入 **Input Method** 选项卡,然后单击 “Add” 按钮。
[![][2]][4]
在列表中选择 “Japanese”
[![][2]][5]
然后,选择 “Anthy” 并点击添加。
[![][2]][6]
就是这样了。你现在将在输入法栏看到 “Japanese - Anthy”。
[![][2]][7]
根据你的需求在偏好设置中更改日语输入法的选项(点击 Japanese - Anthy -> Preferences
[![][2]][8]
你还可以在键盘绑定中编辑默认的快捷键。完成所有更改后,单击应用并确定。就是这样。从任务栏中的 iBus 图标中选择日语,或者按下**Command/Window 键+空格键**来在日语和英语(或者系统中的其他默认语言)之间切换。你可以从 iBus 首选项窗口更改键盘快捷键。
你现在知道如何在 Arch Linux 及其衍生版中使用日语了。如果你发现我们的指南很有用,那么请您在社交、专业网络上分享,并支持 OSTechNix。
--------------------------------------------------------------------------------
via: https://www.ostechnix.com/setup-japanese-language-environment-arch-linux/
作者:[][a]
译者:[geekpi](https://github.com/geekpi)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]:https://www.ostechnix.com
[1]:https://www.ostechnix.com/install-pacaur-arch-linux/
[2]:data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
[3]:http://www.ostechnix.com/wp-content/uploads/2017/11/ibus.png ()
[4]:http://www.ostechnix.com/wp-content/uploads/2017/11/iBus-preferences.png ()
[5]:http://www.ostechnix.com/wp-content/uploads/2017/11/Choose-Japanese.png ()
[6]:http://www.ostechnix.com/wp-content/uploads/2017/11/Japanese-Anthy.png ()
[7]:http://www.ostechnix.com/wp-content/uploads/2017/11/iBus-preferences-1.png ()
[8]:http://www.ostechnix.com/wp-content/uploads/2017/11/ibus-anthy.png ()