OSDN Git Service

(split) DP: release pages (catch up to 3.50).
[linuxjm/LDP_man-pages.git] / release / man7 / locale.7
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Modified Sat Jul 24 17:28:34 1993 by Rik Faith <faith@cs.unc.edu>
26 .\" Modified Sun Jun 01 17:16:34 1997 by Jochen Hein
27 .\"   <jochen.hein@delphi.central.de>
28 .\" Modified Thu Apr 25 00:43:19 2002 by Bruno Haible <bruno@clisp.org>
29 .\"
30 .\" FIXME Document LOCPATH;
31 .\" see http://sourceware.org/bugzilla/show_bug.cgi?id=174
32 .\"*******************************************************************
33 .\"
34 .\" This file was generated with po4a. Translate the source file.
35 .\"
36 .\"*******************************************************************
37 .TH LOCALE 7 2008\-12\-05 Linux "Linux Programmer's Manual"
38 .SH 名前
39 locale \- description of multilanguage support
40 .SH 書式
41 .nf
42 \fB#include <locale.h>\fP
43 .fi
44 .SH 説明
45 ロケール (locale) は言語や文化ルールの集合である。 これらは、メッセージ出力に使用する言語・いろいろな文字集合・
46 表記に関する慣習といったような面をカバーしている。 プログラムをいろいろな文化に移植可能とするには、 そのプログラムは自分のロケールを決めて、
47 それに応じた適切な動作ができなければならない。
48 .PP
49 ヘッダーファイル \fI<locale.h>\fP には、この目的に便利なデータ型・関数・マクロなどの宣言がある。
50 .PP
51 このヘッダーファイルで宣言されている関数には、 現在のロケールを設定する \fBsetlocale\fP(3)
52 と、数値のフォーマット方法についての情報を取得する \fBlocaleconv\fP(3)  がある。
53 .PP
54 プログラムの必要に応じて、ローカル情報はいろいろなカテゴリに分かれており、 それらはマクロとして宣言されている。 これらのマクロを
55 \fBsetlocale\fP(3)  関数の最初の引き数に用いると、 これらのどれかを望むロケールに設定できる。
56 .TP 
57 \fBLC_COLLATE\fP
58 これは地域的なアルファベット文字列の比較に使用する \fBstrcoll\fP(3)  関数と \fBstrxfrm\fP(3)
59 関数の動作を変更する。例えばドイツ語のエスツェット (鋭い s)  は、ソートの際 "ss" として扱われる。
60 .TP 
61 \fBLC_CTYPE\fP
62 これは \fBisupper\fP(3)  や \fBtoupper\fP(3)  のような文字の判定・操作をする関数や、多バイト文字を扱う \fBmblen\fP(3)
63 や \fBwctomb\fP(3)  のような関数の動作を変更する。
64 .TP 
65 \fBLC_MONETARY\fP
66 \fBlocaleconv\fP(3)  によって返される情報を変更する。 これには小数点や区切りコンマの位置など、
67 数字の表示方法に関する詳細が含まれている。この情報は \fBstrfmon\fP(3)  関数が内部で使用する。
68 .TP 
69 \fBLC_MESSAGES\fP
70 メッセージ表示に使用する言語を変更する。 また肯定的・否定的な回答をどのように表示するかを変更する。 これらの情報を簡単に使用するために、 GNU C
71 ライブラリには \fBgettext\fP(3), \fBngettext\fP(3), \fBrpmatch\fP(3)  関数が含まれている。 GNU gettext
72 ファミリーに属する関数は、カテゴリが \fB"C"\fP 以外の有効なロケールに設定されている場合、環境変数 \fBLANGUAGE\fP にも従う
73 (\fBLANGUAGE\fP はコロン区切りのロケールのリストである)。
74 .TP 
75 \fBLC_NUMERIC\fP
76 \fBprintf\fP(3)  関数および \fBscanf\fP(3)  関数のファミリーでロケール設定を使うよう指示された場合に
77 用いる情報を変更する。この情報は \fBlocaleconv\fP(3)  関数で取得することもできる。
78 .TP 
79 \fBLC_TIME\fP
80 \fBstrftime\fP(3)  関数の動作を変更し、 地域で利用されている方法で現在時刻を表示する。 例えば、ヨーロッパの多くでは
81 24時間式の時計を使うが、 アメリカでは 12時間式の時計を使う。
82 .TP 
83 \fBLC_ALL\fP
84 .\" FIXME glibc 2.2.2 added new nonstandard locale categories:
85 .\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME,
86 .\" LC_PAPER, LC_TELEPHONE.  These need to be documented.
87 上記の全て。
88 .PP
89 \fBsetlocale\fP(3)  の二番目の引き数が空文字列 \fB""\fP の場合、 デフォルトのロケールは以下の手順で決定する:
90 .IP 1.
91 環境変数 \fBLC_ALL\fP が設定されている場合には \fBLC_ALL\fP の値が使用される。
92 .IP 2.
93 上記のカテゴリのどれかと同じ名前の環境変数が設定されている場合には、 そのカテゴリにはその値が使用される。
94 .IP 3.
95 環境変数 \fBLANG\fP が設定されている場合には \fBLANG\fP の値が使用される。
96 .PP
97 地域的な数値フォーマットの情報は \fBlocaleconv\fP(3)  関数によって返される \fIstruct lconv\fP
98 で得ることができ、これは以下のように宣言されている:
99 .in +2n
100 .nf
101
102 struct lconv {
103
104     /* (通貨以外の) 数値情報 */
105
106     char *decimal_point;     /* 小数点の文字 */
107     char *thousands_sep;     /* 小数点の左側の数字のグループの
108                                 区切り文字 */
109     char *grouping; /* それぞれの要素は各グループの数字の個数である。
110                        インデックス値が大きいほど、左側のグループを表す。
111                        要素の値が CHAR_MAX の場合は、最後のグループで
112                        あることを意味する。要素の値が 0 の場合は、
113                        その要素より左側の全ての要素に前の要素と同じ値を
114                        使用することを意味する。 */
115
116     /* 残りのフィールドは通貨情報用である */
117
118     char *int_curr_symbol;   /* 最初の三つの文字は ISO 4217 の通貨記号。
119                                 四番目の文字は区切り文字。
120                                 五番目は \(aq\0\(aq。 */
121     char *currency_symbol;   /* 地域の通貨記号 */
122     char *mon_decimal_point; /* 小数点の文字 */
123     char *mon_thousands_sep; /* 上記の `thousands_sep' と同様 */
124     char *mon_grouping;      /* 上記の `grouping' と同様 */
125     char *positive_sign;     /* 正の値の符号 */
126     char *negative_sign;     /* 負の値の符号 */
127     char  int_frac_digits;   /* 国際的な小数部の数字 */
128     char  frac_digits;       /* 地域の小数部の数字 */
129     char  p_cs_precedes;     /* 正の値の前に通貨記号を置く場合は 1,
130                                 後ろに置く場合は 0 */
131     char  p_sep_by_space;    /* 正の値と通貨記号の間にスペースを
132                                 入れる場合は 1 */
133     char  n_cs_precedes;     /* 負の値の前に通貨記号を置く場合は 1,
134                                 後ろに置く場合は 0 */
135     char  n_sep_by_space;    /* 負の値と通貨記号の間にスペースを
136                                 入れる場合は 1 */
137     /* 正と負の符号の位置:
138        0 値と通貨記号を括弧で囲む
139        1 符号は値と通貨記号の前に置く
140        2 符号は値と通貨記号の後に置く
141        3 符号は通貨記号の直後に置く
142        4 符号は通貨記号の直前に置く    */
143     char  p_sign_posn;
144     char  n_sign_posn;
145 };
146 .fi
147 .in
148 .SH 準拠
149 POSIX.1\-2001.
150
151 GNU gettext 関数ファミリーは LI18NUX2000 で規定されている。
152 .SH 関連項目
153 \fBlocale\fP(1), \fBlocaledef\fP(1), \fBgettext\fP(3), \fBlocaleconv\fP(3),
154 \fBngettext\fP(3), \fBnl_langinfo\fP(3), \fBrpmatch\fP(3), \fBsetlocale\fP(3),
155 \fBstrcoll\fP(3), \fBstrfmon\fP(3), \fBstrftime\fP(3), \fBstrxfrm\fP(3)
156 .SH この文書について
157 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
158 である。プロジェクトの説明とバグ報告に関する情報は
159 http://www.kernel.org/doc/man\-pages/ に書かれている。