X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=release%2Fman7%2Flocale.7;h=d244ee2842778b3273f34b59b2c4c79f95c7560f;hp=04216da851168c2a5c642d9fe9ee7b4421efd8fb;hb=cd24a4f8a5e1a5c32e5950f4bb7ef4c243604026;hpb=13b34317e04dd2c26298a978286f2fbfb7bf41df diff --git a/release/man7/locale.7 b/release/man7/locale.7 index 04216da8..d244ee28 100644 --- a/release/man7/locale.7 +++ b/release/man7/locale.7 @@ -51,28 +51,25 @@ locale \- 多言語サポートの解説 \fB#include \fP .fi .SH 説明 -ロケール (locale) は言語や文化ルールの集合である。 これらは、メッセージ出力に使用する言語・いろいろな文字集合・ -表記に関する慣習といったような面をカバーしている。 プログラムをいろいろな文化に移植可能とするには、 そのプログラムは自分のロケールを決めて、 -それに応じた適切な動作ができなければならない。 +ロケール (locale) は言語や文化ルールの集合である。 これには、メッセージ出力に使用する言語、 様々な文字集合、 +表記に関する慣習などが含まれる。 プログラムをいろいろな文化に移植可能とするには、 プログラムが自分のロケールを判定し、 +それに応じた適切な動作ができる必要がある。 .PP -ヘッダーファイル \fI\fP には、この目的に便利なデータ型・関数・マクロなどの宣言がある。 +ヘッダーファイル \fI\fP には、 このための便利なデータ型、 関数、 マクロなどの宣言がある。 .PP このヘッダーファイルで宣言されている関数には、 現在のロケールを設定する \fBsetlocale\fP(3) と、数値のフォーマット方法についての情報を取得する \fBlocaleconv\fP(3) がある。 .PP -プログラムの必要に応じて、ロケール情報はいろいろなカテゴリに分かれており、 それらはマクロとして宣言されている。 これらのマクロを -\fBsetlocale\fP(3) 関数の最初の引き数に用いると、 これらのどれかを望むロケールに設定できる。 +ロケール情報は、 プログラムが必要とすると思われるいくつかのカテゴリに分かれており、 それらはマクロとして宣言されている。 これらのマクロを +\fBsetlocale\fP(3) 関数の最初の引き数に用いると、 各カテゴリを望むロケールに設定できる。 .TP \fBLC_ADDRESS\fP (GNU 拡張、 glibc 2.2 以降) .\" See ISO/IEC Technical Report 14652 -Change settings that describe the formats (e.g., postal addresses) used to -describe locations and geography\-related items. Applications that need this -information can use \fBnl_langinfo\fP(3) to retrieve nonstandard elements, -such as \fB_NL_ADDRESS_COUNTRY_NAME\fP (country name, in the language of the -locale) and \fB_NL_ADDRESS_LANG_NAME\fP (language name, in the language of the -locale), which return strings such as "Deutschland" and "Deutsch" (for -German\-language locales). (Other element names are listed in -\fI\fP.) +場所や地理関連の項目の表示に使用するフォーマット (郵便番号など) に関する設定を変更する。 この情報が必要なアプリケーションは +\fBnl_langinfo\fP(3) を使って非標準の要素を取得できる。 \fB_NL_ADDRESS_COUNTRY_NAME\fP +(指定されたロケールの言語での国名) や \fB_NL_ADDRESS_LANG_NAME\fP (指定されたロケールの言語での言語名) などがあり、 +ドイツ語ロケールでは "Deutschland" と "Deutsch" といった文字列が返される。 他の要素名については +\fI\fP にリストがある。 .TP \fBLC_COLLATE\fP これは地域的なアルファベット文字列の比較に使用する \fBstrcoll\fP(3) 関数と \fBstrxfrm\fP(3) @@ -84,13 +81,11 @@ German\-language locales). (Other element names are listed in .TP \fBLC_IDENTIFICATION\fP (GNU 拡張、 glibc 2.2 以降) .\" See ISO/IEC Technical Report 14652 -Change settings that relate to the metadata for the locale. Applications -that need this information can use \fBnl_langinfo\fP(3) to retrieve -nonstandard elements, such as \fB_NL_IDENTIFICATION_TITLE\fP (title of this -locale document) and \fB_NL_IDENTIFICATION_TERRITORY\fP (geographical -territory to which this locale document applies), which might return strings -such as "English locale for the USA" and "USA". (Other element names are -listed in \fI\fP.) +ロケールのメタデータに関連する設定を変更する。 この情報が必要なアプリケーションは \fBnl_langinfo\fP(3) +を使って非標準の要素を取得できる。 \fB_NL_IDENTIFICATION_TITLE\fP (このロケール文書のタイトル) や +\fB_NL_IDENTIFICATION_TERRITORY\fP (このロケール文書が適用される地理的な範囲) などがあり、 "English +locale for the USA" や "USA" といった文字列が返される。 他の要素名については \fI\fP +にリストがある。 .TP \fBLC_MONETARY\fP \fBlocaleconv\fP(3) によって返される情報を変更する。 これには小数点や区切りコンマの位置など、 @@ -103,42 +98,33 @@ listed in \fI\fP.) (\fBLANGUAGE\fP はコロン区切りのロケールのリストである)。 .TP \fBLC_MEASUREMENT\fP (GNU 拡張、 glibc 2.2 以降) -Change the settings relating to the measurement system in the locale (i.e., -metric versus US customary units). Applications can use \fBnl_langinfo\fP(3) -to retrieve the nonstandard \fB_NL_MEASUREMENT_MEASUREMENT\fP element, which -returns a pointer to a character that has the value 1 (metric) or 2 (US -customary units). +ロケールの測定系 (つまり、メートル法かアメリカでよく使われる単位か) に関連する設定を変更する。 この情報が必要なアプリケーションは +\fBnl_langinfo\fP(3) を使って非標準の要素である \fB_NL_MEASUREMENT_MEASUREMENT\fP を取得できる。 この要素は +1 (メートル法) か 2 (アメリカでよく使われる単位) の値が入った文字列へのポインタを返す。 .TP \fBLC_NAME\fP (GNU 拡張、 glibc 2.2 以降) .\" See ISO/IEC Technical Report 14652 -Change settings that describe the formats used to address persons. -Applications that need this information can use \fBnl_langinfo\fP(3) to -retrieve nonstandard elements, such as \fB_NL_NAME_NAME_MR\fP (general -salutation for men) and \fB_NL_NAME_NAME_MS\fP (general salutation for women) -elements, which return strings such as "Herr" and "Frau" (for -German\-language locales). (Other element names are listed in -\fI\fP.) +人に呼びかける際に使用されるフォーマットに関する設定を変更する。 この情報が必要なアプリケーションは \fBnl_langinfo\fP(3) +を使って非標準の要素を取得できる。 \fB_NL_NAME_NAME_MR\fP (男性に対する一般的な呼び掛け) や \fB_NL_NAME_NAME_MS\fP +(女性に対する一般的な呼び掛け) などがあり、 ドイツ語ロケールでは "Herr" や "Frau" といった文字列が返される。 他の要素名については +\fI\fP にリストがある。 .TP \fBLC_NUMERIC\fP \fBprintf\fP(3) 関数および \fBscanf\fP(3) 関数のファミリーでロケール設定を使うよう指示された場合に 用いる情報を変更する。この情報は \fBlocaleconv\fP(3) 関数で取得することもできる。 .TP -\fBLC_PAPER\fP (GNU extension, since glibc 2.2) +\fBLC_PAPER\fP (GNU 拡張、 glibc 2.2 以降) .\" See ISO/IEC Technical Report 14652 -Change the settings relating to the dimensions of the standard paper size -(e.g., US letter versus A4). Applications that need the dimensions can -obtain them by using \fBnl_langinfo\fP(3) to retrieve the nonstandard -\fB_NL_PAPER_WIDTH\fP and \fB_NL_PAPER_HEIGHT\fP elements, which return \fIint\fP -values specifying the dimensions in millimeters. +標準的な紙のサイズの寸法 (US letter や A4 など) に関する設定を変更する。 この情報が必要なアプリケーションは +\fBnl_langinfo\fP(3) を使って非標準の要素である \fB_NL_PAPER_WIDTH\fP と \fB_NL_PAPER_HEIGHT\fP +を取得できる。 この要素はミリメーター単位の寸法を指定する \fIint\fP 値を返す。 .TP -\fBLC_TELEPHONE\fP (GNU extension, since glibc 2.2) +\fBLC_TELEPHONE\fP (GNU 拡張、 glibc 2.2 以降) .\" See ISO/IEC Technical Report 14652 -Change settings that describe the formats to be used with telephone -services. Applications that need this information can use \fBnl_langinfo\fP(3) -to retrieve nonstandard elements, such as \fB_NL_TELEPHONE_INT_PREFIX\fP -(international prefix used to call numbers in this locale), which returns a -string such as "49" (for Germany). (Other element names are listed in -\fI\fP.) +電話サービスで使用されるフォーマットに関する設定を変更する。 この情報が必要なアプリケーションは \fBnl_langinfo\fP(3) +を使って非標準の要素を取得できる。 \fB_NL_TELEPHONE_INT_PREFIX\fP (そのロケールでの電話番号の前に付く国を示す番号) +などがある。 "49" (ドイツの場合) といった文字列が返される。 他の要素名については \fI\fP +にリストがある。 .TP \fBLC_TIME\fP \fBstrftime\fP(3) 関数の動作を変更し、 地域で利用されている方法で現在時刻を表示する。 例えば、ヨーロッパの多くでは @@ -206,19 +192,15 @@ struct lconv { }; .fi .in -.SS "POSIX.1\-2008 extensions to the locale API" -POSIX.1\-2008 standardized a number of extensions to the locale API, based on -implementations that first appeared in version 2.3 of the GNU C library. -These extensions are designed to address the problem that the traditional -locale APIs do not mix well with multithreaded applications and with -applications that must deal with multiple locales. +.SS "ロケール API の POSIX.1\-2008 での拡張" +POSIX.1\-2008 では、 ロケール API への多くの拡張が標準化されている。 これは GNU C ライブラリのバージョン 2.3 +で初めて登場した実装に基づいている。 これらの拡張は、 従来のロケール API +がマルチスレッドアプリケーションや複数のロケールを扱う必要があるアプリケーションとうまく組み合わせて使うことができない問題を解決するために設計された。 -The extensions take the form of new functions for creating and manipulating -locale objects (\fBnewlocale\fP(3), \fBfreelocale\fP(3), \fBduplocale\fP(3), and -\fBuselocale\fP(3)) and various new library functions with the suffix "_l" -(e.g., \fBtoupper_l\fP(3)) that extend the traditional locale\-dependent APIs -(e.g., \fBtoupper\fP(3)) to allow the specification of a locale object that -should apply when executing the function. +この拡張は、 ロケールオブジェクトの作成、操作のための新しい関数 (\fBnewlocale\fP(3), \fBfreelocale\fP(3), +\fBduplocale\fP(3), \fBuselocale\fP(3)) とサフィックス "_l" が付いた新しいライブラリ関数 +(\fBtoupper_l\fP(3) など) で構成される。 新しいライブラリ関数は、 従来のロケール依存の API (\fBtoupper\fP(3) など) +を関数実行時に適用するロケールオブジェクトの指定ができるように拡張したものである。 .SH 準拠 .\" .\" The GNU gettext functions are specified in LI18NUX2000.