1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Modified Sat Jul 24 17:28:34 1993 by Rik Faith <faith@cs.unc.edu>
24 .\" Modified Sun Jun 01 17:16:34 1997 by Jochen Hein
25 .\" <jochen.hein@delphi.central.de>
26 .\" Modified Thu Apr 25 00:43:19 2002 by Bruno Haible <bruno@clisp.org>
28 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
29 .\" all rights reserved.
30 .\" Translated Wed Dec 24 21:08:08 JST 1997
31 .\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
32 .\" Modified Thu 14 Nov 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
36 .TH LOCALE 7 2008-12-05 "Linux" "Linux Programmer's Manual"
38 .\"O locale \- Description of multilanguage support
44 .B #include <locale.h>
48 .\"O A locale is a set of language and cultural rules.
49 .\"O These cover aspects
50 .\"O such as language for messages, different character sets, lexicographic
51 .\"O conventions, etc.
52 .\"O A program needs to be able to determine its locale
53 .\"O and act accordingly to be portable to different cultures.
54 ロケール (locale) は言語や文化ルールの集合である。
55 これらは、メッセージ出力に使用する言語・いろいろな文字集合・
56 表記に関する慣習といったような面をカバーしている。
57 プログラムをいろいろな文化に移植可能とするには、
59 それに応じた適切な動作ができなければならない。
63 .\"O declares data types, functions and macros which are useful in this
67 には、この目的に便利なデータ型・関数・マクロなどの宣言がある。
69 .\"O The functions it declares are
70 .\"O .BR setlocale (3)
71 .\"O to set the current locale, and
72 .\"O .BR localeconv (3)
73 .\"O to get information about number formatting.
74 このヘッダーファイルで宣言されている関数には、
77 と、数値のフォーマット方法についての情報を取得する
81 .\"O There are different categories for local information a program might
82 .\"O need; they are declared as macros.
83 .\"O Using them as the first argument
85 .\"O .BR setlocale (3)
86 .\"O function, it is possible to set one of these to the desired locale:
87 プログラムの必要に応じて、ローカル情報はいろいろなカテゴリに分かれており、
95 .\"O This is used to change the behavior of the functions
99 .\"O which are used to compare strings in the local alphabet.
101 .\"O the German sharp s is sorted as "ss".
102 これは地域的なアルファベット文字列の比較に使用する
106 関数の動作を変更する。例えばドイツ語のエスツェット (鋭い s)
107 は、ソートの際 "ss" として扱われる。
110 .\"O This changes the behavior of the character handling and
111 .\"O classification functions, such as
114 .\"O .BR toupper (3),
115 .\"O and the multibyte character functions such as
123 のような文字の判定・操作をする関数や、多バイト文字を扱う
130 .\"O changes the information returned by
131 .\"O .BR localeconv (3)
132 .\"O which describes the way numbers are usually printed, with details such
133 .\"O as decimal point versus decimal comma.
134 .\"O This information is internally
135 .\"O used by the function
136 .\"O .BR strfmon (3).
140 数字の表示方法に関する詳細が含まれている。この情報は
145 .\"O changes the language messages are displayed in and what an affirmative or
146 .\"O negative answer looks like.
147 .\"O The GNU C-library contains the
148 .\"O .BR gettext (3),
149 .\"O .BR ngettext (3),
152 .\"O functions to ease the use of these information.
153 .\"O The GNU gettext family of
154 .\"O functions also obey the environment variable
156 .\"O (containing a colon-separated list of locales)
157 .\"O if the category is set to a valid locale other than
160 また肯定的・否定的な回答をどのように表示するかを変更する。
161 これらの情報を簡単に使用するために、 GNU C ライブラリには
166 GNU gettext ファミリーに属する関数は、カテゴリが
168 以外の有効なロケールに設定されている場合、環境変数
172 はコロン区切りのロケールのリストである)。
175 .\"O changes the information used by the
179 .\"O family of functions, when they are advised to use the
180 .\"O locale-settings.
181 .\"O This information can also be read with the
182 .\"O .BR localeconv (3)
187 関数のファミリーでロケール設定を使うよう指示された場合に
193 .\"O changes the behavior of the
194 .\"O .BR strftime (3)
195 .\"O function to display the current time in a locally acceptable form; for
196 .\"O example, most of Europe uses a 24-hour clock versus the
197 .\"O 12-hour clock used in the United States.
200 地域で利用されている方法で現在時刻を表示する。
201 例えば、ヨーロッパの多くでは 24時間式の時計を使うが、
205 .\"O All of the above.
207 .\" FIXME glibc 2.2.2 added new nonstandard locale categories:
208 .\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME,
209 .\" LC_PAPER, LC_TELEPHONE. These need to be documented.
211 .\"O If the second argument to
212 .\"O .BR setlocale (3)
213 .\"O is empty string,
215 .\"O for the default locale, it is determined using the following steps:
217 の二番目の引き数が空文字列 \fB""\fP の場合、
218 デフォルトのロケールは以下の手順で決定する:
220 .\"O If there is a non-null environment variable
231 .\"O If an environment variable with the same name as one of the categories
232 .\"O above exists and is non-null, its value is used for that category.
233 上記のカテゴリのどれかと同じ名前の環境変数が設定されている場合には、
236 .\"O If there is a non-null environment variable
247 .\"O Values about local numeric formatting is made available in a
250 .\"O .BR localeconv (3)
251 .\"O function, which has the following declaration:
256 で得ることができ、これは以下のように宣言されている:
262 .\"O /* Numeric (nonmonetary) information */
265 .\"O char *decimal_point; /* Radix character */
266 .\"O char *thousands_sep; /* Separator for digit groups to left
267 .\"O of radix character */
268 .\"O char *grouping; /* Each element is the number of digits in a
269 .\"O group; elements with higher indices are
270 .\"O further left. An element with value CHAR_MAX
271 .\"O means that no further grouping is done. An
272 .\"O element with value 0 means that the previous
273 .\"O element is used for all groups further left. */
274 char *decimal_point; /* 小数点の文字 */
275 char *thousands_sep; /* 小数点の左側の数字のグループの
277 char *grouping; /* それぞれの要素は各グループの数字の個数である。
278 インデックス値が大きいほど、左側のグループを表す。
279 要素の値が CHAR_MAX の場合は、最後のグループで
280 あることを意味する。要素の値が 0 の場合は、
281 その要素より左側の全ての要素に前の要素と同じ値を
284 .\"O /* Remaining fields are for monetary information */
285 /* 残りのフィールドは通貨情報用である */
287 .\"O char *int_curr_symbol; /* First three chars are a currency symbol
288 .\"O from ISO 4217. Fourth char is the
289 .\"O separator. Fifth char is \(aq\0\(aq. */
290 .\"O char *currency_symbol; /* Local currency symbol */
291 .\"O char *mon_decimal_point; /* Radix character */
292 .\"O char *mon_thousands_sep; /* Like `thousands_sep' above */
293 .\"O char *mon_grouping; /* Like `grouping' above */
294 .\"O char *positive_sign; /* Sign for positive values */
295 .\"O char *negative_sign; /* Sign for negative values */
296 .\"O char int_frac_digits; /* International fractional digits */
297 .\"O char frac_digits; /* Local fractional digits */
298 char *int_curr_symbol; /* 最初の三つの文字は ISO 4217 の通貨記号。
301 char *currency_symbol; /* 地域の通貨記号 */
302 char *mon_decimal_point; /* 小数点の文字 */
303 char *mon_thousands_sep; /* 上記の `thousands_sep' と同様 */
304 char *mon_grouping; /* 上記の `grouping' と同様 */
305 char *positive_sign; /* 正の値の符号 */
306 char *negative_sign; /* 負の値の符号 */
307 char int_frac_digits; /* 国際的な小数部の数字 */
308 char frac_digits; /* 地域の小数部の数字 */
309 .\"O char p_cs_precedes; /* 1 if currency_symbol precedes a
310 .\"O positive value, 0 if succeeds */
311 .\"O char p_sep_by_space; /* 1 if a space separates currency_symbol
312 .\"O from a positive value */
313 .\"O char n_cs_precedes; /* 1 if currency_symbol precedes a
314 .\"O negative value, 0 if succeeds */
315 .\"O char n_sep_by_space; /* 1 if a space separates currency_symbol
316 .\"O from a negative value */
317 char p_cs_precedes; /* 正の値の前に通貨記号を置く場合は 1,
319 char p_sep_by_space; /* 正の値と通貨記号の間にスペースを
321 char n_cs_precedes; /* 負の値の前に通貨記号を置く場合は 1,
323 char n_sep_by_space; /* 負の値と通貨記号の間にスペースを
325 .\"O /* Positive and negative sign positions:
326 .\"O 0 Parentheses surround the quantity and currency_symbol.
327 .\"O 1 The sign string precedes the quantity and currency_symbol.
328 .\"O 2 The sign string succeeds the quantity and currency_symbol.
329 .\"O 3 The sign string immediately precedes the currency_symbol.
330 .\"O 4 The sign string immediately succeeds the currency_symbol. */
342 .\"O .SH "CONFORMING TO"
346 .\"O The GNU gettext functions are specified in LI18NUX2000.
347 GNU gettext 関数ファミリーは LI18NUX2000 で規定されている。