OSDN Git Service

Release locale related pages
authorAkihiro MOTOKI <amotoki@gmail.com>
Sat, 24 Jan 2015 20:42:57 +0000 (05:42 +0900)
committerAkihiro MOTOKI <amotoki@gmail.com>
Sat, 24 Jan 2015 20:42:57 +0000 (05:42 +0900)
release/man1/locale.1 [new file with mode: 0644]
release/man3/setlocale.3
release/man3/uselocale.3 [new file with mode: 0644]
release/man7/locale.7
translation_list

diff --git a/release/man1/locale.1 b/release/man1/locale.1
new file mode 100644 (file)
index 0000000..1cd67d5
--- /dev/null
@@ -0,0 +1,158 @@
+.\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%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.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
index 1b6f8ce..8b817df 100644 (file)
@@ -68,7 +68,7 @@ LC_ADDRESS    T{
 .br
 要素のフォーマット
 T}
-LC_COLLATE     String collation
+LC_COLLATE     文字の照合順序
 LC_CTYPE       文字の分類
 LC_IDENTIFICATION      ロケールの説明メタデータ (*)
 LC_MEASUREMENT T{
diff --git a/release/man3/uselocale.3 b/release/man3/uselocale.3
new file mode 100644 (file)
index 0000000..d1bbe28
--- /dev/null
@@ -0,0 +1,95 @@
+.\" t
+.\" Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" %%%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 USELOCALE 3 2014\-03\-10 Linux "Linux Programmer's Manual"
+.SH 名前
+setlocale \- 現在のスレッドのロケール (locale) を設定/取得する
+.SH 書式
+.nf
+\fB#include <locale.h>\fP
+
+\fBlocale_t uselocale(locale_t \fP\fInewloc\fP\fB);\fP
+.fi
+.sp
+.in -4n
+glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
+.in
+.sp
+\fBuselocale\fP():
+.PD 0
+.RS 4
+.TP 
+glibc 2.10 以降:
+_XOPEN_SOURCE\ >=\ 700
+.TP 
+glibc 2.10 より前:
+_GNU_SOURCE
+.RE
+.PD
+.SH 説明
+\fBuselocale\fP() 関数は呼び出し元スレッドの現在のロケールを設定し、 そのスレッドの現在のロケールの直前の値を返す。
+\fBuselocale\fP() の呼び出しが成功した後は、 ロケールに依存する関数のこのスレッドによる呼び出しは \fInewloc\fP
+で設定されたロケールで動作する。
+
+\fInewloc\fP 引き数には以下の値のいずれかを指定できる。
+.TP 
+\fBnewlocale\fP(3) か \fBduplocale\fP(3) の呼び出しで返されたハンドル
+呼び出し元スレッドの現在のロケールを指定したロケールに設定する。
+.TP 
+特別な値のロケールオブジェクトハンドル \fBLC_GLOBAL_LOCALE\fP
+呼び出し元スレッドの現在のロケールを \fBsetlocale\fP(3) で決定されるグローバルロケールに設定する。
+.TP 
+\fI(locale_t) 0\fP
+呼び出し元スレッドの現在のロケールは変更されないままである (関数呼び出しの結果として現在のロケールが返される)。
+.SH 返り値
+成功すると、 \fBuselocale\fP() は、 このスレッドで一つ前の \fBuselocale\fP() の呼び出しで設定されたロケールハンドルを返す。
+前に \fBuselocale\fP() が呼び出されていない場合は \fBLC_GLOBAL_HANDLE\fP を返す。 エラーの場合、
+\fI(locale_t)\ 0\fP を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
+.SH エラー
+.TP 
+\fBEINVAL\fP
+\fInewloc\fP が有効なロケールオブジェクトを参照していない。
+.SH バージョン
+\fBuselocale\fP() 関数は GNU C ライブラリのバージョン 2.3 で初めて登場した。
+.SH 準拠
+POSIX.1\-2008.
+.SH 注意
+\fBsetlocale\fP(3) と異なり、 \fBuselocale\fP() では特定のロケールカテゴリーだけを指定して置き換えることはできない。
+いくつかのカテゴリーだけで現在のロケールとは異なるカテゴリーを利用するには、 \fBduplocale\fP(3) と \fBnewlocale\fP(3)
+を呼び出して、 現在のロケールと等価なロケールオブジェクトを取得し、 そのオブジェクトの所望のカテゴリーを変更する必要がある。
+.SH 例
+\fBnewlocale\fP(3) と \fBduplocale\fP(3) を参照。
+.SH 関連項目
+\fBlocale\fP(1), \fBduplocale\fP(3), \fBfreelocale\fP(3), \fBnewlocale\fP(3),
+\fBsetlocale\fP(3), \fBlocale\fP(5), \fBlocale\fP(7)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。
index 2d8f000..b7e770a 100644 (file)
@@ -69,20 +69,14 @@ locale \- 多言語サポートの解説
 \fI<langinfo.h>\fP にリストがある。
 .TP 
 \fBLC_COLLATE\fP
-This category governs the collation rules used for sorting and regular
-expressions, including character equivalence classes and multicharacter
-collating elements.  This locale category changes the behavior of the
-functions \fBstrcoll\fP(3)  and \fBstrxfrm\fP(3), which are used to compare
-strings in the local alphabet.  For example, the German sharp s is sorted as
-"ss".
+このカテゴリーは、 並び換え (sorting) や正規表現で使用される照合順序 (collate) を制御する。 その中には、
+文字の等価クラスや複数文字の照合順序も含まれる。 このロケールカテゴリーは、 地域的なアルファベット文字列の比較に使用する \fBstrcoll\fP(3)
+関数と \fBstrxfrm\fP(3) 関数の動作を変更する。例えばドイツ語のエスツェット (鋭い s)  は、ソートの際 "ss" として扱われる。
 .TP 
 \fBLC_CTYPE\fP
-This category determines the interpretation of byte sequences as characters
-(e.g., single versus multibyte characters), character classifications (e.g.,
-alphabetic or digit), and the behavior of character classes.  It changes the
-behavior of the character handling and classification functions, such as
-\fBisupper\fP(3)  and \fBtoupper\fP(3), and the multibyte character functions such
-as \fBmblen\fP(3)  or \fBwctomb\fP(3).
+このカテゴリーは、 バイト列の文字としての解釈 (例えば、シングルバイト文字とマルチバイト文字か)、 文字クラス (例えば、アルファベットか数字か)
+や文字クラスの動作を決定する。 これは \fBisupper\fP(3)  や \fBtoupper\fP(3)
+のような文字の判定・操作をする関数や、多バイト文字を扱う \fBmblen\fP(3)  や \fBwctomb\fP(3)  のような関数の動作を変更する。
 .TP 
 \fBLC_IDENTIFICATION\fP (GNU 拡張、 glibc 2.2 以降)
 .\" See ISO/IEC Technical Report 14652
@@ -93,20 +87,14 @@ locale for the USA" や "USA" といった文字列が返される。 他の要
 にリストがある。
 .TP 
 \fBLC_MONETARY\fP
-This category determines the formatting used for monetary\-related numeric
-values.  This changes the information returned by \fBlocaleconv\fP(3), which
-describes the way numbers are usually printed, with details such as decimal
-point versus decimal comma.  This information is internally used by the
-function \fBstrfmon\fP(3).
+このカテゴリーは、 金額に関連する数値の表示方法を決定する。 \fBlocaleconv\fP(3)  によって返される情報を変更する。
+これには小数点や区切りコンマの位置など、 数字の表示方法に関する詳細が含まれている。この情報は \fBstrfmon\fP(3)  関数が内部で使用する。
 .TP 
 \fBLC_MESSAGES\fP
-This category affects the language in which messages are displayed and what
-an affirmative or negative answer looks like.  The GNU C library contains
-the \fBgettext\fP(3), \fBngettext\fP(3), and \fBrpmatch\fP(3)  functions to ease the
-use of this information.  The GNU gettext family of functions also obey the
-environment variable \fBLANGUAGE\fP (containing a colon\-separated list of
-locales)  if the category is set to a valid locale other than \fB"C"\fP.  This
-category also affects the behavior of \fBcatopen\fP(3).
+このカテゴリーは、 メッセージ表示に使用する言語と、 肯定的・否定的な回答をどのように表示するかに影響する。 この情報を簡単に使用するために、 GNU
+C ライブラリには \fBgettext\fP(3), \fBngettext\fP(3), \fBrpmatch\fP(3)  関数が含まれている。 GNU
+gettext ファミリーに属する関数は、カテゴリが \fB"C"\fP 以外の有効なロケールに設定されている場合、環境変数 \fBLANGUAGE\fP にも従う
+(\fBLANGUAGE\fP はコロン区切りのロケールのリストである)。 このカテゴリーは \fBcatopen\fP(3) の動作にも影響する。
 .TP 
 \fBLC_MEASUREMENT\fP (GNU 拡張、 glibc 2.2 以降)
 ロケールの測定系 (つまり、メートル法かアメリカでよく使われる単位か) に関連する設定を変更する。 この情報が必要なアプリケーションは
@@ -121,12 +109,10 @@ category also affects the behavior of \fBcatopen\fP(3).
 \fI<langinfo.h>\fP にリストがある。
 .TP 
 \fBLC_NUMERIC\fP
-This category determines the formatting rules used for nonmonetary numeric
-values\(emfor example, the thousands separator and the radix character (a
-period in most English\-speaking countries, but a comma in many other
-regions).  It affects functions such as \fBprintf\fP(3), \fBscanf\fP(3), and
-\fBstrtod\fP(3).  This information can also be read with the \fBlocaleconv\fP(3)
-function.
+このカテゴリーは、 金額に関係しない数値で使用される表示方法を決定する。 例えば、 1000 単位の区切り文字や小数点文字
+(ほとんどの英語圏の国ではピリオドを使用するが、 多くの他の地域ではカンマを使用する)。 このカテゴリーは \fBprintf\fP(3),
+\fBscanf\fP(3), \fBstrtod\fP(3) などの関数の動作に影響する。 この情報は \fBlocaleconv\fP(3)
+関数でも読み出すことができる。
 .TP 
 \fBLC_PAPER\fP (GNU 拡張、 glibc 2.2 以降)
 .\" See ISO/IEC Technical Report 14652
@@ -142,10 +128,8 @@ function.
 にリストがある。
 .TP 
 \fBLC_TIME\fP
-This category governs the formatting used for date and time values.  For
-example, most of Europe uses a 24\-hour clock versus the 12\-hour clock used
-in the United States.  The setting of this category affects the behavior of
-functions such as \fBstrftime\fP(3)  and \fBstrptime\fP(3).
+このカテゴリーは、 日付と時刻の値に使用される表示方法を制御する。 例えば、 ヨーロッパのほとんどでは 24 時間時計を使用するが、 アメリカでは 12
+時間時計を使用する。 このカテゴリーの設定は \fBstrftime\fP(3) や \fBstrptime\fP(3) などの関数の動作に影響する。
 .TP 
 \fBLC_ALL\fP
 上記の全て。
@@ -219,26 +203,23 @@ POSIX.1\-2008 では、 ロケール API への多くの拡張が標準化され
 (\fBtoupper_l\fP(3) など) で構成される。 新しいライブラリ関数は、 従来のロケール依存の API (\fBtoupper\fP(3) など)
 を関数実行時に適用するロケールオブジェクトの指定ができるように拡張したものである。
 .SH 環境変数
-The following environment variable is used by \fBnewlocale\fP(3)  and
-\fBsetlocale\fP(3), and thus affects all unprivileged localized programs:
+以下の環境変数が \fBnewlocale\fP(3) と \fBsetlocale\fP(3) で使用される。 したがって、
+特権を持たないロケールを参照するすべてのプログラムに影響がある。
 .TP 
 \fBLOCPATH\fP
-A list of pathnames, separated by colons (\(aq:\(aq), that should be used to
-find locale data.  If this variable is set, only the individual compiled
-locale data files from \fILOCPATH\fP and the system default locale data path
-are used; any available locale archives are not used (see \fBlocaledef\fP(1)).
-The individual compiled locale data files are searched for under
-subdirectories which depend on the currently used locale.  For example, when
-\fIen_GB.UTF\-8\fP is used for a category, the following subdirectories are
-searched for, in this order: \fIen_GB.UTF\-8\fP, \fIen_GB.utf8\fP, \fIen_GB\fP,
-\fIen.UTF\-8\fP, \fIen.utf8\fP, and \fIen\fP.
+コロン (\(aq:\(aq) 区切りの、 ロケールデータを検索するパス名のリスト。 この変数が設定されると、 \fILOCPATH\fP
+とシステムのデフォルトのロケールデータのパスにある、 個々のコンパイルされたロケールデータファイルだけが使用される。
+ロケールアーカイブは利用可能でも使用されない (\fBlocaledef\fP(1) 参照)。 個々のコンパイルされたロケールデータファイルは、
+現在使用されているロケールに応じたサブディレクトリから検索される。 例えば、 あるカテゴリーで \fIen_GB.UTF\-8\fP が使用されている場合、
+サブディレクトリ \fIen_GB.UTF\-8\fP, \fIen_GB.utf8\fP, \fIen_GB\fP, \fIen.UTF\-8\fP, \fIen.utf8\fP,
+\fIen\fP がこの順序で検索される。
 .SH ファイル
 .TP 
 \fI/usr/lib/locale/locale\-archive\fP
 通常のデフォルトのロケールアーカイブファイル
 .TP 
 \fI/usr/lib/locale\fP
-Usual default path for compiled individual locale files.
+コンパイルされたロケールファイルの通常のデフォルトのパス。
 .SH 準拠
 .\"
 .\" The GNU gettext functions are specified in LI18NUX2000.
index 49572c4..f07bb84 100644 (file)
@@ -2,7 +2,7 @@
 ○:LDP man-pages:3.78:2014/07/08:iconv:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2007/11/15:intro:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/10/02:ldd:1:2015/01/24::ysato@h4.dion.ne.jp:Yuichi SATO:
-×:LDP man-pages:3.78:2014/05/28:locale:1:::::
+○:LDP man-pages:3.78:2014/05/28:locale:1:2015/01/25::amotoki@gmail.com:Akihiro Motoki:
 ×:LDP man-pages:3.78:2014/12/31:localedef:1:::::
 ○:LDP man-pages:3.78:2014/09/06:memusage:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki:
 ○:LDP man-pages:3.78:2014/09/06:memusagestat:1:2015/01/24::amotoki@gmail.com:Akihiro Motoki: