X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=draft%2Fman7%2Flocale.7;h=3a63ba14092696256d6ec97dbce706ca53eca7fd;hp=f09ea9bd778ed40f22b1c2019d90fad6dac40ac8;hb=1d98b26905be2ad5ba08a94d65f57d872bae4f85;hpb=38394e00bdc712dc8637aada383aebb3a95a9cbf diff --git a/draft/man7/locale.7 b/draft/man7/locale.7 index f09ea9bd..3a63ba14 100644 --- a/draft/man7/locale.7 +++ b/draft/man7/locale.7 @@ -25,252 +25,80 @@ .\" .\" Modified Thu Apr 25 00:43:19 2002 by Bruno Haible .\" -.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya -.\" all rights reserved. -.\" Translated Wed Dec 24 21:08:08 JST 1997 -.\" by HANATAKA Shinya -.\" Modified Thu 14 Nov 2002 by NAKANO Takeo +.\"******************************************************************* .\" -.\"WORD: locale ロケール +.\" This file was generated with po4a. Translate the source file. .\" -.TH LOCALE 7 2008-12-05 "Linux" "Linux Programmer's Manual" -.\"O .SH NAME -.\"O locale \- Description of multilanguage support +.\"******************************************************************* +.TH LOCALE 7 2008\-12\-05 Linux "Linux Programmer's Manual" .SH 名前 locale \- 多言語サポートの解説 -.\"O .SH SYNOPSIS .SH 書式 .nf -.B #include +\fB#include \fP .fi -.\"O .SH DESCRIPTION .SH 説明 -.\"O A locale is a set of language and cultural rules. -.\"O These cover aspects -.\"O such as language for messages, different character sets, lexicographic -.\"O conventions, etc. -.\"O A program needs to be able to determine its locale -.\"O and act accordingly to be portable to different cultures. -ロケール (locale) は言語や文化ルールの集合である。 -これらは、メッセージ出力に使用する言語・いろいろな文字集合・ -表記に関する慣習といったような面をカバーしている。 -プログラムをいろいろな文化に移植可能とするには、 -そのプログラムは自分のロケールを決めて、 +ロケール (locale) は言語や文化ルールの集合である。 これらは、メッセージ出力に使用する言語・いろいろな文字集合・ +表記に関する慣習といったような面をカバーしている。 プログラムをいろいろな文化に移植可能とするには、 そのプログラムは自分のロケールを決めて、 それに応じた適切な動作ができなければならない。 .PP -.\"O The header -.\"O .I -.\"O declares data types, functions and macros which are useful in this -.\"O task. -ヘッダーファイル -.I -には、この目的に便利なデータ型・関数・マクロなどの宣言がある。 +ヘッダーファイル \fI\fP には、この目的に便利なデータ型・関数・マクロなどの宣言がある。 .PP -.\"O The functions it declares are -.\"O .BR setlocale (3) -.\"O to set the current locale, and -.\"O .BR localeconv (3) -.\"O to get information about number formatting. -このヘッダーファイルで宣言されている関数には、 -現在のロケールを設定する -.BR setlocale (3) -と、数値のフォーマット方法についての情報を取得する -.BR localeconv (3) -がある。 +このヘッダーファイルで宣言されている関数には、 現在のロケールを設定する \fBsetlocale\fP(3) +と、数値のフォーマット方法についての情報を取得する \fBlocaleconv\fP(3) がある。 .PP -.\"O There are different categories for local information a program might -.\"O need; they are declared as macros. -.\"O Using them as the first argument -.\"O to the -.\"O .BR setlocale (3) -.\"O function, it is possible to set one of these to the desired locale: -プログラムの必要に応じて、ローカル情報はいろいろなカテゴリに分かれており、 -それらはマクロとして宣言されている。 -これらのマクロを -.BR setlocale (3) -関数の最初の引き数に用いると、 -これらのどれかを望むロケールに設定できる。 -.TP -.B LC_COLLATE -.\"O This is used to change the behavior of the functions -.\"O .BR strcoll (3) -.\"O and -.\"O .BR strxfrm (3), -.\"O which are used to compare strings in the local alphabet. -.\"O For example, -.\"O the German sharp s is sorted as "ss". -これは地域的なアルファベット文字列の比較に使用する -.BR strcoll (3) -関数と -.BR strxfrm (3) -関数の動作を変更する。例えばドイツ語のエスツェット (鋭い s) -は、ソートの際 "ss" として扱われる。 -.TP -.B LC_CTYPE -.\"O This changes the behavior of the character handling and -.\"O classification functions, such as -.\"O .BR isupper (3) -.\"O and -.\"O .BR toupper (3), -.\"O and the multibyte character functions such as -.\"O .BR mblen (3) -.\"O or -.\"O .BR wctomb (3). -これは -.BR isupper (3) -や -.BR toupper (3) -のような文字の判定・操作をする関数や、多バイト文字を扱う -.BR mblen (3) -や -.BR wctomb (3) -のような関数の動作を変更する。 -.TP -.B LC_MONETARY -.\"O changes the information returned by -.\"O .BR localeconv (3) -.\"O which describes the way numbers are usually printed, with details such -.\"O as decimal point versus decimal comma. -.\"O This information is internally -.\"O used by the function -.\"O .BR strfmon (3). -.BR localeconv (3) -によって返される情報を変更する。 -これには小数点や区切りコンマの位置など、 -数字の表示方法に関する詳細が含まれている。この情報は -.BR strfmon (3) -関数が内部で使用する。 -.TP -.B LC_MESSAGES -.\"O changes the language messages are displayed in and what an affirmative or -.\"O negative answer looks like. -.\"O The GNU C-library contains the -.\"O .BR gettext (3), -.\"O .BR ngettext (3), -.\"O and -.\"O .BR rpmatch (3) -.\"O functions to ease the use of these information. -.\"O The GNU gettext family of -.\"O functions also obey the environment variable -.\"O .BR LANGUAGE -.\"O (containing a colon-separated list of locales) -.\"O if the category is set to a valid locale other than -.\"O .BR """C""" . -メッセージ表示に使用する言語を変更する。 -また肯定的・否定的な回答をどのように表示するかを変更する。 -これらの情報を簡単に使用するために、 GNU C ライブラリには -.BR gettext (3), -.BR ngettext (3), -.BR rpmatch (3) -関数が含まれている。 -GNU gettext ファミリーに属する関数は、カテゴリが -.B """C""" -以外の有効なロケールに設定されている場合、環境変数 -.B LANGUAGE -にも従う -.RB ( LANGUAGE -はコロン区切りのロケールのリストである)。 -.TP -.B LC_NUMERIC -.\"O changes the information used by the -.\"O .BR printf (3) -.\"O and -.\"O .BR scanf (3) -.\"O family of functions, when they are advised to use the -.\"O locale-settings. -.\"O This information can also be read with the -.\"O .BR localeconv (3) -.\"O function. -.BR printf (3) -関数および -.BR scanf (3) -関数のファミリーでロケール設定を使うよう指示された場合に -用いる情報を変更する。この情報は -.BR localeconv (3) -関数で取得することもできる。 -.TP -.B LC_TIME -.\"O changes the behavior of the -.\"O .BR strftime (3) -.\"O function to display the current time in a locally acceptable form; for -.\"O example, most of Europe uses a 24-hour clock versus the -.\"O 12-hour clock used in the United States. -.BR strftime (3) -関数の動作を変更し、 -地域で利用されている方法で現在時刻を表示する。 -例えば、ヨーロッパの多くでは 24時間式の時計を使うが、 -アメリカでは 12時間式の時計を使う。 -.TP -.B LC_ALL -.\"O All of the above. -上記の全て。 +プログラムの必要に応じて、ローカル情報はいろいろなカテゴリに分かれており、 それらはマクロとして宣言されている。 これらのマクロを +\fBsetlocale\fP(3) 関数の最初の引き数に用いると、 これらのどれかを望むロケールに設定できる。 +.TP +\fBLC_COLLATE\fP +これは地域的なアルファベット文字列の比較に使用する \fBstrcoll\fP(3) 関数と \fBstrxfrm\fP(3) +関数の動作を変更する。例えばドイツ語のエスツェット (鋭い s) は、ソートの際 "ss" として扱われる。 +.TP +\fBLC_CTYPE\fP +これは \fBisupper\fP(3) や \fBtoupper\fP(3) のような文字の判定・操作をする関数や、多バイト文字を扱う \fBmblen\fP(3) +や \fBwctomb\fP(3) のような関数の動作を変更する。 +.TP +\fBLC_MONETARY\fP +\fBlocaleconv\fP(3) によって返される情報を変更する。 これには小数点や区切りコンマの位置など、 +数字の表示方法に関する詳細が含まれている。この情報は \fBstrfmon\fP(3) 関数が内部で使用する。 +.TP +\fBLC_MESSAGES\fP +メッセージ表示に使用する言語を変更する。 また肯定的・否定的な回答をどのように表示するかを変更する。 これらの情報を簡単に使用するために、 GNU C +ライブラリには \fBgettext\fP(3), \fBngettext\fP(3), \fBrpmatch\fP(3) 関数が含まれている。 GNU gettext +ファミリーに属する関数は、カテゴリが \fB"C"\fP 以外の有効なロケールに設定されている場合、環境変数 \fBLANGUAGE\fP にも従う +(\fBLANGUAGE\fP はコロン区切りのロケールのリストである)。 +.TP +\fBLC_NUMERIC\fP +\fBprintf\fP(3) 関数および \fBscanf\fP(3) 関数のファミリーでロケール設定を使うよう指示された場合に +用いる情報を変更する。この情報は \fBlocaleconv\fP(3) 関数で取得することもできる。 +.TP +\fBLC_TIME\fP +\fBstrftime\fP(3) 関数の動作を変更し、 地域で利用されている方法で現在時刻を表示する。 例えば、ヨーロッパの多くでは +24時間式の時計を使うが、 アメリカでは 12時間式の時計を使う。 +.TP +\fBLC_ALL\fP .\" FIXME glibc 2.2.2 added new nonstandard locale categories: .\" LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME, .\" LC_PAPER, LC_TELEPHONE. These need to be documented. +上記の全て。 .PP -.\"O If the second argument to -.\"O .BR setlocale (3) -.\"O is empty string, -.\"O .BR """""" , -.\"O for the default locale, it is determined using the following steps: -.BR setlocale (3) -の二番目の引き数が空文字列 \fB""\fP の場合、 -デフォルトのロケールは以下の手順で決定する: +\fBsetlocale\fP(3) の二番目の引き数が空文字列 \fB""\fP の場合、 デフォルトのロケールは以下の手順で決定する: .IP 1. -.\"O If there is a non-null environment variable -.\"O .BR LC_ALL , -.\"O the value of -.\"O .B LC_ALL -.\"O is used. -環境変数 -.B LC_ALL -が設定されている場合には -.B LC_ALL -の値が使用される。 +環境変数 \fBLC_ALL\fP が設定されている場合には \fBLC_ALL\fP の値が使用される。 .IP 2. -.\"O If an environment variable with the same name as one of the categories -.\"O above exists and is non-null, its value is used for that category. -上記のカテゴリのどれかと同じ名前の環境変数が設定されている場合には、 -そのカテゴリにはその値が使用される。 +上記のカテゴリのどれかと同じ名前の環境変数が設定されている場合には、 そのカテゴリにはその値が使用される。 .IP 3. -.\"O If there is a non-null environment variable -.\"O .BR LANG , -.\"O the value of -.\"O .B LANG -.\"O is used. -環境変数 -.B LANG -が設定されている場合には -.B LANG -の値が使用される。 +環境変数 \fBLANG\fP が設定されている場合には \fBLANG\fP の値が使用される。 .PP -.\"O Values about local numeric formatting is made available in a -.\"O .I struct lconv -.\"O returned by the -.\"O .BR localeconv (3) -.\"O function, which has the following declaration: -地域的な数値フォーマットの情報は -.BR localeconv (3) -関数によって返される -.I struct lconv +地域的な数値フォーマットの情報は \fBlocaleconv\fP(3) 関数によって返される \fIstruct lconv\fP で得ることができ、これは以下のように宣言されている: -.in +4n +.in +2n .nf struct lconv { -.\"O /* Numeric (nonmonetary) information */ /* (通貨以外の) 数値情報 */ -.\"O char *decimal_point; /* Radix character */ -.\"O char *thousands_sep; /* Separator for digit groups to left -.\"O of radix character */ -.\"O char *grouping; /* Each element is the number of digits in a -.\"O group; elements with higher indices are -.\"O further left. An element with value CHAR_MAX -.\"O means that no further grouping is done. An -.\"O element with value 0 means that the previous -.\"O element is used for all groups further left. */ char *decimal_point; /* 小数点の文字 */ char *thousands_sep; /* 小数点の左側の数字のグループの 区切り文字 */ @@ -281,20 +109,8 @@ struct lconv { その要素より左側の全ての要素に前の要素と同じ値を 使用することを意味する。 */ -.\"O /* Remaining fields are for monetary information */ /* 残りのフィールドは通貨情報用である */ -.\"O char *int_curr_symbol; /* First three chars are a currency symbol -.\"O from ISO 4217. Fourth char is the -.\"O separator. Fifth char is \(aq\0\(aq. */ -.\"O char *currency_symbol; /* Local currency symbol */ -.\"O char *mon_decimal_point; /* Radix character */ -.\"O char *mon_thousands_sep; /* Like `thousands_sep' above */ -.\"O char *mon_grouping; /* Like `grouping' above */ -.\"O char *positive_sign; /* Sign for positive values */ -.\"O char *negative_sign; /* Sign for negative values */ -.\"O char int_frac_digits; /* International fractional digits */ -.\"O char frac_digits; /* Local fractional digits */ char *int_curr_symbol; /* 最初の三つの文字は ISO 4217 の通貨記号。 四番目の文字は区切り文字。 五番目は \(aq\0\(aq。 */ @@ -306,14 +122,6 @@ struct lconv { char *negative_sign; /* 負の値の符号 */ char int_frac_digits; /* 国際的な小数部の数字 */ char frac_digits; /* 地域の小数部の数字 */ -.\"O char p_cs_precedes; /* 1 if currency_symbol precedes a -.\"O positive value, 0 if succeeds */ -.\"O char p_sep_by_space; /* 1 if a space separates currency_symbol -.\"O from a positive value */ -.\"O char n_cs_precedes; /* 1 if currency_symbol precedes a -.\"O negative value, 0 if succeeds */ -.\"O char n_sep_by_space; /* 1 if a space separates currency_symbol -.\"O from a negative value */ char p_cs_precedes; /* 正の値の前に通貨記号を置く場合は 1, 後ろに置く場合は 0 */ char p_sep_by_space; /* 正の値と通貨記号の間にスペースを @@ -322,12 +130,6 @@ struct lconv { 後ろに置く場合は 0 */ char n_sep_by_space; /* 負の値と通貨記号の間にスペースを 入れる場合は 1 */ -.\"O /* Positive and negative sign positions: -.\"O 0 Parentheses surround the quantity and currency_symbol. -.\"O 1 The sign string precedes the quantity and currency_symbol. -.\"O 2 The sign string succeeds the quantity and currency_symbol. -.\"O 3 The sign string immediately precedes the currency_symbol. -.\"O 4 The sign string immediately succeeds the currency_symbol. */ /* 正と負の符号の位置: 0 値と通貨記号を括弧で囲む 1 符号は値と通貨記号の前に置く @@ -339,23 +141,11 @@ struct lconv { }; .fi .in -.\"O .SH "CONFORMING TO" .SH 準拠 -POSIX.1-2001 +POSIX.1\-2001. -.\"O The GNU gettext functions are specified in LI18NUX2000. GNU gettext 関数ファミリーは LI18NUX2000 で規定されている。 -.\"O .SH "SEE ALSO" .SH 関連項目 -.BR locale (1), -.BR localedef (1), -.BR gettext (3), -.BR localeconv (3), -.BR ngettext (3), -.BR nl_langinfo (3), -.BR rpmatch (3), -.BR setlocale (3), -.BR strcoll (3), -.BR strfmon (3), -.BR strftime (3), -.BR strxfrm (3) +\fBlocale\fP(1), \fBlocaledef\fP(1), \fBgettext\fP(3), \fBlocaleconv\fP(3), +\fBngettext\fP(3), \fBnl_langinfo\fP(3), \fBrpmatch\fP(3), \fBsetlocale\fP(3), +\fBstrcoll\fP(3), \fBstrfmon\fP(3), \fBstrftime\fP(3), \fBstrxfrm\fP(3)