.\" Copyright (C) 2014 Michael Kerrisk .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH LOCALE 1 2014\-05\-28 Linux "Linux User Manual" .SH 名前 locale \- ロケール固有の情報を取得する .SH 書式 .nf \fBlocale\fP [\fIoption\fP] \fBlocale\fP [\fIoption\fP] \-a \fBlocale\fP [\fIoption\fP] \-m \fBlocale\fP [\fIoption\fP] \fIname\fP... .fi .SH 説明 \fBlocale\fP コマンドは、 現在のロケールもしくはすべてのロケールに関する情報を、 標準出力に表示する。 引き数なしで呼び出された場合、 \fBlocale\fP は現在のロケール設定を各ロケールカテゴリー毎 (\fBlocale\fP(5) 参照) に表示する。 ロケールを制御する環境変数の設定 (\fBlocale\fP(&)) に基づいて行われる。 オプション \fB\-a\fP か \fB\-m\fP のどちらか (もしくは同等の長い形式のオプション) が指定された場合、 動作は以下のようになる。 .TP \fB\-a\fP, \fB\-\-all\-locales\fP 利用可能なすべてのロケールを表示する。 \fB\-v\fP オプションが指定されると、 各ロケールに関する \fBLC_IDENTIFICATION\fP メタデータも出力される。 .TP \fB\-m\fP, \fB\-\-charmaps\fP 利用可能な charmap (文字集合記述ファイル) の一覧を表示する。 .PP \fBlocale\fP コマンドには引き数として渡すことができる (複数指定可)。 これらの引き数は、 ロケールのキーワード名 (例えば \fIdate_fmt\fP, \fIctype\-class\-names\fP, \fIyesexpr\fP, \fIdecimal_point\fP) か、ロケールのカテゴリー名 (例えば \fBLC_CTYPE\fP, \fBLC_TIME\fP) である。 各引き数について以下の情報が表示される。 .IP * 3 ロケールキーワードについては、 そのキーワードの値が表示される。 .IP * ロケールカテゴリーについては、 そのカテゴリーの全キーワードの値が表示される。 .PP 引き数が指定された場合には、 以下のオプションが意味を持つ。 .TP \fB\-c\fP, \fB\-\-category\-name\fP カテゴリー名が引き数に指定された場合、 そのカテゴリーのキーワード値のリストの前に、 ロケールカテゴリー名を独立した行で表示する。 キーワード名が引き数に指定された場合、 キーワード値の前にこのキーワードのロケールカテゴリーを独立した行で表示する。 複数の名前引き数が指定された場合に、このオプションを使うと可読性があがる。 \fB\-k\fP オプションと組み合わせて使用できる。 .TP \fB\-k\fP, \fB\-\-keyword\-name\fP キーワード値を表示する際に、 次の形式でそのキーワードの名前も合わせて表示する。 \fIkeyword\fP="\fIvalue\fP" .PP \fBlocale\fP コマンドでは以下のオプションも使用できる。 .TP \fB\-v\fP, \fB\-\-verbose\fP いくつかのコマンドラインオプションと引き数の組み合わせで追加の情報を表示する。 .TP \fB\-?\fP, \fB\-\-help\fP コマンドラインオプションと引き数の概要を表示し終了する。 .TP \fB\-\-usage\fP 完結な使用方法を表示し終了する。 .TP \fB\-V\fP, \fB\-\-version\fP プログラムのバージョンを表示し終了する。 .SH ファイル .TP \fI/usr/lib/locale/locale\-archive\fP 通常のデフォルトのロケールアーカイブファイル .TP \fI/usr/share/i18n/locales\fP ロケール定義ファイルの通常のデフォルトパス .SH 準拠 POSIX.1\-2001, POSIX.1\-2008. .SH 例 .nf $ \fBlocale\fP LANG=en_US.UTF\-8 LC_CTYPE="en_US.UTF\-8" LC_NUMERIC="en_US.UTF\-8" LC_TIME="en_US.UTF\-8" LC_COLLATE="en_US.UTF\-8" LC_MONETARY="en_US.UTF\-8" LC_MESSAGES="en_US.UTF\-8" LC_PAPER="en_US.UTF\-8" LC_NAME="en_US.UTF\-8" LC_ADDRESS="en_US.UTF\-8" LC_TELEPHONE="en_US.UTF\-8" LC_MEASUREMENT="en_US.UTF\-8" LC_IDENTIFICATION="en_US.UTF\-8" LC_ALL= $ \fBlocale date_fmt\fP %a %b %e %H:%M:%S %Z %Y $ \fBlocale \-k date_fmt\fP date_fmt="%a %b %e %H:%M:%S %Z %Y" $ \fBlocale \-ck date_fmt\fP LC_TIME date_fmt="%a %b %e %H:%M:%S %Z %Y" $ \fBlocale LC_TELEPHONE\fP +%c (%a) %l (%a) %l 11 1 UTF\-8 $ \fBlocale \-k LC_TELEPHONE\fP tel_int_fmt="+%c (%a) %l" tel_dom_fmt="(%a) %l" int_select="11" int_prefix="1" telephone\-codeset="UTF\-8" .fi 以下の例では、 \fI./wrk\fP ディレクトリにある独自のロケールを \fBlocaledef\fP(1) ユーティリティを使って \fI$HOME/.locale\fP でコンパイルし、 \fBdate\fP(1) コマンドでその結果をテストし、 それからシェルの設定ファイルで環境変数 \fBLOCPATH\fP と \fBLANG\fP を設定し、 それ以降のユーザーセッションで独自のロケールを利用できるようにしている。 .nf $ \fBmkdir \-p $HOME/.locale\fP $ \fBI18NPATH=./wrk/ localedef \-f UTF\-8 \-i fi_SE $HOME/.locale/fi_SE.UTF\-8\fP $ \fBLOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF\-8 date\fP $ \fBecho "export LOCPATH=\e$HOME/.locale" >> $HOME/.bashrc\fP $ \fBecho "export LANG=fi_SE.UTF\-8" >> $HOME/.bashrc\fP .fi .SH 関連項目 \fBlocaledef\fP(1), \fBcharmap\fP(5), \fBlocale\fP(5), \fBlocale\fP(7) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。