OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / setlocale.3
index 02c7202..e2fb9a1 100644 (file)
 .\" Modified Tue Aug 24 17:11:01 1999 by Andries Brouwer (aeb@cwi.nl)
 .\" Modified Tue Feb  6 03:31:55 2001 by Andries Brouwer (aeb@cwi.nl)
 .\"
-.\" Japanese Version Copyright (c) 1998 Tanoshima Hidetohsi
-.\"         all rights reserved.
-.\" Translated May 29 1998, Tanoshima Hidetoshi <tano@sainet.or.jp>
-.\" Modified Mon Oct  2 11:09:18 JST 2000
-.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
-.\" Updated Fri May  4 01:49:48 JST 2001
-.\"         by Kentaro Shirakata <argrath@ub32.org>
-.\" Updated Sat Oct 12 2002 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
+.\"*******************************************************************
 .\"
-.\"WORD:       locale                  ロケール
-.\"WORD:       portable                互換性のある
-.\"WORD:       regular expression      正規表現
-.\"WORD:       range expressions       範囲表現
-.\"WORD:       equivalence classes     等価クラス
-.\"WORD:       collation               照合
-.\"WORD:       multibyte character     多バイト文字
-.\"WORD:       wide character          ワイド文字
-.\"WORD:       opaque string           内部文字列
+.\" This file was generated with po4a. Translate the source file.
 .\"
-.TH SETLOCALE 3  2008-12-05 "GNU" "Linux Programmer's Manual"
+.\"*******************************************************************
+.TH SETLOCALE 3 2008\-12\-05 GNU "Linux Programmer's Manual"
 .SH 名前
-.\"O setlocale \- set the current locale
 setlocale \- 現在のロケール (locale) を設定する
 .SH 書式
 .nf
-.B #include <locale.h>
+\fB#include <locale.h>\fP
 .sp
-.BI "char *setlocale(int " category ", const char *" locale );
+\fBchar *setlocale(int \fP\fIcategory\fP\fB, const char *\fP\fIlocale\fP\fB);\fP
 .fi
 .SH 説明
-.\"O .BR setlocale ()
-.\"O function is used to set or query the program's current locale.
-.BR setlocale ()
-関数はプログラムのカレントロケールを設定したり
-問い合わせたりするのに用いられる。
+\fBsetlocale\fP()  関数はプログラムのカレントロケールを設定したり 問い合わせたりするのに用いられる。
 .PP
-.\"O If
-.\"O .I locale
-.\"O is not NULL,
-.\"O the program's current locale is modified according to the arguments.
-.I locale
-が NULL でなければ、プログラムのカレントロケールは引き数に従って変更される。
-.\"O The argument
-.\"O .I category
-.\"O determines which parts of the program's current locale should be modified.
-引き数
-.I category
+\fIlocale\fP が NULL でなければ、プログラムのカレントロケールは引き数に従って変更される。 引き数 \fIcategory\fP
 はプログラムのカレントロケールのどの部分を変更するかを決める。
-.TP
-.B LC_ALL
-.\"O for all of the locale.
+.TP 
+\fBLC_ALL\fP
 全てのロケール
-.TP
-.B LC_COLLATE
-.\"O for regular expression matching (it determines the meaning
-.\"O of range expressions and equivalence classes) and string collation.
-正規表現のマッチング (範囲表現と等価クラスのマッチングを決定する)
-と文字列の照合 (collation)
-.TP
-.B LC_CTYPE
-.\"O for regular expression matching, character classification, conversion,
-.\"O case-sensitive comparison, and wide character functions.
-正規表現のマッチング、文字の分類、文字の変換、大文字小文字比較、
-ワイド文字関数
-.TP
-.B LC_MESSAGES
-.\"O for localizable natural-language messages.
+.TP 
+\fBLC_COLLATE\fP
+正規表現のマッチング (範囲表現と等価クラスのマッチングを決定する)  と文字列の照合 (collation)
+.TP 
+\fBLC_CTYPE\fP
+正規表現のマッチング、文字の分類、文字の変換、大文字小文字比較、 ワイド文字関数
+.TP 
+\fBLC_MESSAGES\fP
 地域化可能な自然言語メッセージ
-.TP
-.B LC_MONETARY
-.\"O for monetary formatting.
+.TP 
+\fBLC_MONETARY\fP
 通貨の書式
-.TP
-.B LC_NUMERIC
-.\"O for number formatting (such as the decimal point and the thousands separator).
+.TP 
+\fBLC_NUMERIC\fP
 数値の書式 (小数点や 3 桁ごとの区切り)
-.TP
-.B LC_TIME
-.\"O for time and date formatting.
+.TP 
+\fBLC_TIME\fP
 時刻と日付けの書式
 .PP
-.\"O The argument
-.\"O .I locale
-.\"O is a pointer to a character string containing the
-.\"O required setting of
-.\"O .IR category .
-引き数
-.I locale
-は
-.I category
-に設定する文字列へのポインタである。
-.\"O Such a string is either a well-known constant like "C" or "da_DK"
-.\"O (see below), or an opaque string that was returned by another call of
-.\"O .BR setlocale ().
-この文字列はよく知られた定数である "C" や "da_DK" などでも良いし
-(以下を参照)、他のときに
-.BR setlocale ()
-を呼び出した際に返された、内部用の文字列でも良い。
+引き数 \fIlocale\fP は \fIcategory\fP に設定する文字列へのポインタである。 この文字列はよく知られた定数である "C" や
+"da_DK" などでも良いし (以下を参照)、他のときに \fBsetlocale\fP()  を呼び出した際に返された、内部用の文字列でも良い。
 .PP
-.\"O If
-.\"O .I locale
-.\"O is
-.\"O .BR """""" ,
-.\"O each part of the locale that should be modified is set according to the
-.\"O environment variables.
-.\"O The details are implementation-dependent.
-.I locale
-が \fB""\fP の場合、ロケールの各部分の設定には環境変数が参照される。
-その詳細は実装依存である。
-.\"O For glibc, first (regardless of
-.\"O .IR category ),
-.\"O the environment variable
-.\"O .B LC_ALL
-.\"O is inspected,
-.\"O next the environment variable with the same name as the category
-.\"O .RB ( LC_COLLATE ,
-.\"O .BR LC_CTYPE ,
-.\"O .BR LC_MESSAGES ,
-.\"O .BR LC_MONETARY ,
-.\"O .BR LC_NUMERIC ,
-.\"O .BR LC_TIME )
-.\"O and finally the environment variable
-.\"O .BR LANG .
-.\"O The first existing environment variable is used.
-.\"O If its value is not a valid locale specification, the locale
-.\"O is unchanged, and
-.\"O .BR setlocale ()
-.\"O returns NULL.
-glibc の場合、まず最初に (どんな
-.I category
-に対しても) 環境変数
-.B LC_ALL
-が検査される。
-次にカテゴリ (category) と同じ名前の環境変数
-.RB ( LC_COLLATE ,
-.BR LC_CTYPE ,
-.BR LC_MESSAGES ,
-.BR LC_MONETARY ,
-.BR LC_NUMERIC ,
-.BR LC_TIME )
-が検査され、最後に環境変数
-.B LANG
-が検査される。
-最初に見つかった環境変数を使用する。
-その値がロケール指定として正しくなければ、ロケールは変更されず、
-.BR setlocale ()
-は NULL を返す。
+\fIlocale\fP が \fB""\fP の場合、ロケールの各部分の設定には環境変数が参照される。 その詳細は実装依存である。 glibc の場合、まず最初に
+(どんな \fIcategory\fP に対しても) 環境変数 \fBLC_ALL\fP が検査される。 次にカテゴリ (category) と同じ名前の環境変数
+(\fBLC_COLLATE\fP, \fBLC_CTYPE\fP, \fBLC_MESSAGES\fP, \fBLC_MONETARY\fP, \fBLC_NUMERIC\fP,
+\fBLC_TIME\fP)  が検査され、最後に環境変数 \fBLANG\fP が検査される。 最初に見つかった環境変数を使用する。
+その値がロケール指定として正しくなければ、ロケールは変更されず、 \fBsetlocale\fP()  は NULL を返す。
 .PP
-.\"O The locale
-.\"O .B """C"""
-.\"O or
-.\"O .B """POSIX"""
-.\"O is a portable locale; its
-.\"O .B LC_CTYPE
-.\"O part corresponds to the 7-bit ASCII
-.\"O character set.
-\fB"C"\fP ロケールや \fB"POSIX"\fP ロケールは互換性のあるロケールである。
-この
-.B LC_CTYPE
-の部分は 7 ビット ASCII 文字集合に相当している。
+\fB"C"\fP ロケールや \fB"POSIX"\fP ロケールは互換性のあるロケールである。 この \fBLC_CTYPE\fP の部分は 7 ビット ASCII
+文字集合に相当している。
 .PP
-.\"O A locale name is typically of the form
-.\"O .IR language "[_" territory "][." codeset "][@" modifier "],"
-.\"O where
-.\"O .I language
-.\"O is an ISO 639 language code,
-.\"O .I territory
-.\"O is an ISO 3166 country code, and
-.\"O .I codeset
-.\"O is a character set or encoding identifier like
-.\"O .B "ISO-8859-1"
-.\"O or
-.\"O .BR "UTF-8" .
-ロケール名の書式は、通常
-.IR language "[_" territory "][." codeset "][@" modifier "]"
-というものである。
-ここで
-.I language
-は ISO 639 の言語コードである。
-.I territory
-は ISO 3166 の国名コードである。
-.I codeset
-は
-.B "ISO-8859-1"
-や
-.B "UTF-8"
-のような文字集合や文字符号化識別子である。
-.\"O For a list of all supported locales, try "locale \-a", cf.\&
-.\"O .BR locale (1).
-サポートされているロケールの一覧を得るには、
-"locale \-a" を実行してみよ
-.RB ( locale (1)
-参照のこと)。
+ロケール名の書式は、通常 \fIlanguage\fP[_\fIterritory\fP][.\fIcodeset\fP][@\fImodifier\fP] というものである。
+ここで \fIlanguage\fP は ISO 639 の言語コードである。 \fIterritory\fP は ISO 3166 の国名コードである。
+\fIcodeset\fP は \fBISO\-8859\-1\fP や \fBUTF\-8\fP のような文字集合や文字符号化識別子である。
+サポートされているロケールの一覧を得るには、 "locale \-a" を実行してみよ (\fBlocale\fP(1)  参照のこと)。
 .PP
-.\"O If
-.\"O .I locale
-.\"O is NULL, the current locale is only queried, not modified.
-.I locale
-が NULL ならば、現在のロケールを問い合わせるのみで変更はしない。
+\fIlocale\fP が NULL ならば、現在のロケールを問い合わせるのみで変更はしない。
 .PP
-.\"O On startup of the main program, the portable
-.\"O .B """C"""
-.\"O locale is selected as default.
-main プログラムの起動時には、
-互換性のある \fB"C"\fP ロケールがデフォルトで選択される。
-.\"O A program may be made portable to all locales by calling:
-.\"O .nf
-.\"O 
-.\"O     setlocale(LC_ALL, "");
-.\"O 
-.\"O .fi
-.\"O after program initialization, by using the values returned
-.\"O from a
-.\"O .BR localeconv (3)
-.\"O call
-.\"O for locale-dependent information, by using the multibyte and wide
-.\"O character functions for text processing if
-.\"O .BR "MB_CUR_MAX > 1" ,
-.\"O and by using
-.\"O .BR strcoll (3),
-.\"O .BR wcscoll (3)
-.\"O or
-.\"O .BR strxfrm (3),
-.\"O .BR wcsxfrm (3)
-.\"O to compare strings.
-プログラムをすべてのロケールに対して互換にしたければ、
-プログラムの初期化の後に
+main プログラムの起動時には、 互換性のある \fB"C"\fP ロケールがデフォルトで選択される。
+プログラムをすべてのロケールに対して互換にしたければ、 プログラムの初期化の後に
 .nf
 
     setlocale(LC_ALL, "");
 
 .fi
-を呼び出し、ロケール依存の情報には
-.BR localeconv (3)
-の返り値を用い、
-.BR "MB_CUR_MAX > 1"
-の場合には文字列の操作には多バイト文字、ワイド文字関数を使用し、
-文字列の比較には
-.BR strcoll (3),
-.BR wcscoll (3)
-や
-.BR strxfrm (3),
-.BR wcsxfrm (3)
-を用いる。
+を呼び出し、ロケール依存の情報には \fBlocaleconv\fP(3)  の返り値を用い、 \fBMB_CUR_MAX > 1\fP
+の場合には文字列の操作には多バイト文字、ワイド文字関数を使用し、 文字列の比較には \fBstrcoll\fP(3), \fBwcscoll\fP(3)  や
+\fBstrxfrm\fP(3), \fBwcsxfrm\fP(3)  を用いる。
 .SH 返り値
-.\"O A successful call to
-.\"O .BR setlocale ()
-.\"O returns an opaque string that corresponds to the locale set.
-.\"O This string may be allocated in static storage.
-.\"O The string returned is such that a subsequent call with that string
-.\"O and its associated category will restore that part of the process's
-.\"O locale.
-.\"O The return value is NULL if the request cannot be honored.
-.BR setlocale ()
-の呼び出しに成功すると、
-そのロケール集合に対応する内部文字列 (opaque string) を返す。
-この文字列は静的な記憶域に割り当てられているかもしれない。
-この返って来た文字列を、カテゴリ指定と共に、
-のちの setlocale の呼び出しに指定すれば、
-プロセスのその部分のロケールが復元される。
-設定に失敗した場合には、返り値は NULL になる。
+\fBsetlocale\fP()  の呼び出しに成功すると、 そのロケール集合に対応する内部文字列 (opaque string) を返す。
+この文字列は静的な記憶域に割り当てられているかもしれない。 この返って来た文字列を、カテゴリ指定と共に、 のちの setlocale
+の呼び出しに指定すれば、 プロセスのその部分のロケールが復元される。 設定に失敗した場合には、返り値は NULL になる。
 .SH 準拠
-C89, C99, POSIX.1-2001.
+C89, C99, POSIX.1\-2001.
 .SH 注意
-.\"O Linux (that is, glibc) supports the portable locales
-Linux (というか glibc) は互換性のあるロケールとして
-\fB"C"\fP と \fB"POSIX"\fP をサポートしている。
-.\"O In the good old days there used to be support for
-.\"O the European Latin-1
-.\"O .B """ISO-8859-1"""
-.\"O locale (e.g., in libc-4.5.21 and libc-4.6.27), and the Russian
-.\"O .B """KOI-8"""
-.\"O (more precisely, "koi-8r") locale (e.g., in libc-4.6.27),
-.\"O so that having an environment variable \fILC_CTYPE=ISO-8859-1\fP
-.\"O sufficed to make
-.\"O .BR isprint (3)
-.\"O return the right answer.
-.\"O These days non-English speaking Europeans have to work a bit harder,
-.\"O and must install actual locale files.
-古きよき時代には (例えば libc-4.5.21 と libc-4.6.27 などでは)、
-European Latin-1 向けに
-\fB"ISO-8859-1"\fP ロケールがサポートされており、
-ロシア語 (Russian) 向けに \fB"KOI-8"\fP
-(より正確には "koi-8r") ロケールがサポートされていた。
-従って環境変数を \fILC_CTYPE=ISO-8859-1\fP と指定するだけで
-.BR isprint (3)
-は正しい答えを返した。
-最近では、英語以外を使うヨーロッパ人はもう少々やっかいな作業を必要とし、
+Linux (というか glibc) は互換性のあるロケールとして \fB"C"\fP と \fB"POSIX"\fP をサポートしている。 古きよき時代には
+(例えば libc\-4.5.21 と libc\-4.6.27 などでは)、 European Latin\-1 向けに \fB"ISO\-8859\-1"\fP
+ロケールがサポートされており、 ロシア語 (Russian) 向けに \fB"KOI\-8"\fP (より正確には "koi\-8r")
+ロケールがサポートされていた。 従って環境変数を \fILC_CTYPE=ISO\-8859\-1\fP と指定するだけで \fBisprint\fP(3)
+は正しい答えを返した。 最近では、英語以外を使うヨーロッパ人はもう少々やっかいな作業を必要とし、
 実際のロケールファイルをインストールしなければならない。
 .SH 関連項目
-.BR locale (1),
-.BR localedef (1),
-.BR isalpha (3),
-.BR localeconv (3),
-.BR nl_langinfo (3),
-.BR rpmatch (3),
-.BR strcoll (3),
-.BR strftime (3),
-.BR charsets (7),
-.BR locale (7)
+\fBlocale\fP(1), \fBlocaledef\fP(1), \fBisalpha\fP(3), \fBlocaleconv\fP(3),
+\fBnl_langinfo\fP(3), \fBrpmatch\fP(3), \fBstrcoll\fP(3), \fBstrftime\fP(3),
+\fBcharsets\fP(7), \fBlocale\fP(7)