OSDN Git Service

Address unmatch newlines in special ja.po
[linuxjm/LDP_man-pages.git] / draft / man3 / setlocale.3
index 02c7202..4cb046a 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
 .\" and Copyright 1999 by Bruno Haible (haible@clisp.cons.org)
 .\"
+.\" %%%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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
-.\" License.
+.\" %%%LICENSE_END
+.\"
 .\" Modified Sat Jul 24 18:20:12 1993 by Rik Faith (faith@cs.unc.edu)
 .\" Modified Tue Jul 15 16:49:10 1997 by Andries Brouwer (aeb@cwi.nl)
 .\" Modified Sun Jul  4 14:52:16 1999 by Bruno Haible (haible@clisp.cons.org)
 .\" 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)
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 1998 Tanoshima Hidetohsi
 .\"         all rights reserved.
 .\" Translated May 29 1998, Tanoshima Hidetoshi <tano@sainet.or.jp>
 .\"         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           内部文字列
-.\"
-.TH SETLOCALE 3  2008-12-05 "GNU" "Linux Programmer's Manual"
+.TH SETLOCALE 3 2014\-05\-28 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
-.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
-.B LC_MONETARY
-.\"O for monetary formatting.
-通貨の書式
-.TP
-.B LC_NUMERIC
-.\"O for number formatting (such as the decimal point and the thousands separator).
-数値の書式 (小数点や 3 桁ごとの区切り)
-.TP
-.B LC_TIME
-.\"O for time and date formatting.
-時刻と日付けの書式
+.TS
+lB lB
+lB l.
+カテゴリー        制御対象
+LC_ALL 全てのロケール
+LC_ADDRESS     T{
+住所と地理関連の
+.br
+要素のフォーマット
+T}
+LC_COLLATE     文字の照合順序
+LC_CTYPE       文字の分類
+LC_IDENTIFICATION      ロケールの説明メタデータ (*)
+LC_MEASUREMENT T{
+単位系に関する設定
+.br
+(メートル法か US 由来の単位系) (*)
+T}
+LC_MESSAGES    地域化可能な自然言語メッセージ
+LC_MONETARY    金額の表示方法
+LC_NAME        人へのあいさつの言葉
+LC_NUMERIC     金額以外の数値の表示方法
+LC_PAPER       標準の紙のサイズに関する設定 (*)
+LC_TELEPHONE   電話サービスで使用されるフォーマット (*)
+LC_TIME        日付と時刻の表示方法
+.TE
+.PP
+上の表でアスタリスクが付い ているたカテゴリーは GNU 拡張である。 ロケールのカテゴリーの詳細な情報は \fBlocale\fP(7) を参照。
 .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)
+と同じ名前の環境変数 (上記の表を参照) が検査され、最後に環境変数 \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.
-.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)
-は正しい答えを返した。
-最近では、英語以外を使うヨーロッパ人はもう少々やっかいな作業を必要とし、
-実際のロケールファイルをインストールしなければならない。
+C89, C99, POSIX.1\-2001.
 .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)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。