ローカルな数値および通貨フォーマット情報を有する連想配列を返します。
localeconv() は、 setlocale() で設定されたカレントのロケールに基 づきデータを返します。返される連想配列は、次のフィールドを有しま す。
配列要素 | 説明 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
decimal_point | 小数点文字 | ||||||||||
thousands_sep | 千毎の区切り文字 | ||||||||||
grouping | 数値集合を有する配列 | ||||||||||
int_curr_symbol | 国際通貨記号 (すなわち、USD) | ||||||||||
currency_symbol | ローカルな通貨記号 (すなわち、$) | ||||||||||
mon_decimal_point | 通貨用の小数点文字 | ||||||||||
mon_thousands_sep | 通貨用の千毎の区切り文字 | ||||||||||
mon_grouping | 通貨集合を有する配列 | ||||||||||
positive_sign | 正の値を表す記号 | ||||||||||
negative_sign | 負の値を表す記号 | ||||||||||
int_frac_digits | 国際分割桁 | ||||||||||
frac_digits | ローカルな分割桁 | ||||||||||
p_cs_precedes | currency_symbol が正の値を前に置く場合にTRUE、後に置く場合に FALSE | ||||||||||
p_sep_by_space | 正の値から currency_symbol を1文字の空白で区切る場合にTRUE、 そうでない場合にFALSE | ||||||||||
n_cs_precedes | currency_symbol が負の値を前に置く場合にTRUE、後に置く場合に FALSE | ||||||||||
n_sep_by_space | 負の値から currency_symbol を1文字の空白で区切る場合にTRUE、 そうでない場合にFALSE | ||||||||||
p_sign_posn |
| ||||||||||
n_sign_posn |
|
The grouping fields contain arrays that define the way numbers should be grouped. For example, the grouping field for the en_US locale, would contain a 2 item array with the values 3 and 3. The higher the index in the array, the farther left the grouping is. If an array element is equal to CHAR_MAX, no further grouping is done. If an array element is equal to 0, the previous element should be used.
定数 CHAR_MAX は上記の方法を使用する場合にも定義されます。
注意 PHP 4.0.5で追加されました。
setlocale()も参照下さい。