Localization/Guide/ja

標準時
時刻を適切に保つには、あなたのタイムゾーン（標準時）を選び、システムがどの地域にあるのかを知らせる必要があります.

OpenRC
あなたのタイムゾーンをから探してください. たただし、名前がであるようなタイムゾーンは避けてください. 名前から期待されるようなゾーンにならないからです. 例えばは、実際にはGMT+8になります.

ブリュッセルの標準時を使用したいとすると、 を以下のように編集します:

を emerge すると、あなたの ファイルが適切に更新されるでしょう:

新しいタイムゾーン情報を確認するには:

systemd
あなたがsystemdを使っているなら、 コマンドを使ってタイムゾーンを設定する必要があります. 最初に、利用可能なタイムゾーンをチェックします:

そして、選んだ標準時を設定:

最後に、引数無しで コマンドを実行して結果を確認します:

OpenRC
ほとんどのGentoo Linuxのインストールでは、ハードウェアクロックはUTC（またはGMT、グリニッジ標準時）に設定されます. その後で、実際の現地時間を決定するため、あなたのタイムゾーンが利用されます. 何らかの理由でUTCではないハードウェアクロックが必要な場合、 (もしGentoo BSDを使っているなら: ) を編集して、 の値を から に変更する必要があります.

UTC の時刻を使用する設定 /etc/conf.d/hwclock

ローカルタイムゾーンの時刻を利用する設定 /etc/conf.d/hwclock

ロケールとは何ですか?
ロケールは、国や言語に特有の設定を決定するために使う情報の集合体で、大抵のプログラムがこれを利用します. ロケールとそのデータはシステムライブラリの一部であり、ほとんどのシステムにおいて にあります. ロケール名は一般に、 という形式で命名されます. ここで は2 (または3) 文字の言語コード (ISO-639で規定) であり、 は2 (または3) 文字の国コード (ISO-3166で規定) になります. 多くの場合、変形情報 (バリアント) がロケール名に追加されます. 例えば、 や です. ロケールと関連する記事をもっと読むには、Wikipedia (英語)を探してみてください.

ロケール関連の環境変数
ロケール設定の色々な側面を制御する環境変数を以下の表に示します. これらのすべては、上記の 形式で表記されたロケール名を1つだけ設定できます.

Most typically users only set the LANG variable on the global basis.

Generating Specific Locales
You will probably only use one or maybe two locales on your system. You can specify locales you will need in.

The next step is to run. It will generate all the locales you have specified in the file.

You can verify that your selected locales are available by running.

OpenRC
When using OpenRC locale settings are stored in environment variables. These are typically set in the (for system-wide settings) and  (for user-specific settings) file. More details can be found in UTF-8. The system wide settings can be managed through. For instance, to set the  variable to the   value:

Of course, you can edit the file manually as well and diversify the locale variables.

It's also possible, and pretty common especially in a more traditional UNIX environment, to leave the global settings unchanged, i.e. in the " " locale. Users can still specify their preferred locale in their own shell RC file:

Another way of configuring system is to leave it in the default C locale, but enable UTF-8 character representation at the same time. This option is achieved using the following settings in :

Using the above snippet, users will be able to see localized file names properly, while not being forced to your preferred language.

Once you have set the right locale, be sure to update your environment variables to make your system aware of the change.

For a system-wide default locale:

For a user-specific locale:

After this, you will need to kill your X server by pressing +  +, log out, then log in as user.

Now, verify that the changes have taken effect:

systemd
If you use systemd you should set your locale with the  command. Check the list of available locales with:

Then set the locale you want:

Finally check if the result is good:

OpenRC
The keyboard layout used by the console is set in by the   variable. Valid values can be found in. has further subdivisions into layout (,, etc.). Some languages have multiple options, so you may wish to experiment to decide which one fits your needs best.

systemd
With systemd the keymap layout used for your console can be set using the  command. First check the available keymap layouts:

Then set the console keymap layout you want:

Finally check if the console keymap layout was set correctly:

Keyboard layout for the X server
The keyboard layout to be used by the X server is specified in by the   option.

If you have an international keyboard layout, you should set the option XkbModel to pc102 or pc105, as this will allow mapping of the additional keys specific to your keyboard.

Deadkeys allow you to press keys that will not show immediately but will be combined with another letter to produce a single character. Setting XkbVariant to nodeadkeys allows input these special characters into X terminals.

If you would like to switch between more than one keyboard layout (for example English and Russian), all you have to do is add a few lines to that specify the desired layouts and the shortcut command.

Here,  allows you to toggle between keyboard layouts by simply pressing. This will also toggle the Scroll Lock light on or off, thanks to the  option. This is a handy visual indicator of which keyboard layout you are using at the moment.

systemd
With systemd the keymap layout for the X11 server can be set using the  command. First check the available X11 keymap layouts:

Then set the X11 keymap layout you want:

Finally check if the X11 keymap layout was set correctly:

KDE
For KDE you have to install the and  packages. These respect the described earlier.

OpenRC
In order to get your console to display the Euro symbol, you will need to set  in  to a file found in  (without the   ). has the Euro symbol.

You should verify that consolefont is in the boot runlevel:

If no runlevel is displayed for , then add it to the proper level:

大概のアプリケーション
Getting the Euro symbol to work properly in X is a little bit tougher. The first thing you should do is change the  and   definitions in  to end in   instead of.

Some applications use their own font, and you will have to tell them separately to use a font with the Euro symbol. You can do this at a user-specific level in (you can copy this file to  for use by new users), or at a global level for any application with a resource file in  (like xterm). In these files you generally have to change an existing line, rather than adding a new one. To change our xterm font, for instance:

(X)Emacs における 通貨ユーロ記号
(X)Emacs で通貨ユーロの記号を利用するには、 に以下のとおり追加:

emacs へのフォント設定

XEmacs (純粋な Emacs ではない)では、さらなる作業が少し必要です. に以下を追加:

xemacs でのフォント設定

LibreOffice
The current stable and  ebuilds support the  for selecting installed GUI language packs. To see the status of GUI translation, hyphenation, spell checking and other localisations on your language, please refer to LibreOffice translation web site.

NLS
For message based localization to work in programs that support it, you will probably need to have programs compiled with the  (Native language support) USE flag set. Message strings are installed in files. Most of the programs using nls also need the gettext library to extract and use localized messages. Of course, Portage will automatically install it when needed.

After enabling the  USE flag you may need to re-emerge some packages:

LINGUAS
There is also an additional localization variable called, which affects the localization files that get installed in gettext-based programs, and decides which GUI language packs should be installed for some specific software packages, such as Firefox, Thunderbird,  or. The variable takes in space-separated list of language codes, and a suggested place to set it is :

For finer grained control it can be set per package in :

A list of installed programs making use of the  variable and their supported languages can be shown as follows:

利用可能なロケールのリストは にあります:

After setting the  USE flag it may be necessary to re-emerge some packages:

外部の情報

 * Locales and Internationalization (gnu.org)

参考

 * Configuring locales (Gentoo ハンドブック)
 * Xorg resources:
 * Evdev の記事内の Keyboard layout
 * X resources