例子
在本例中,我们将获得美国本地的数字格式化信息:
<?php
setlocale(LC_ALL, US);
$locale_info = localeconv()
;
print_r($locale_info);
?>
输出:
Array
(
[decimal_point] => .
[thousands_sep] => ,
[int_curr_symbol] => USD
[currency_symbol] => $
[mon_decimal_point] => .
[mon_thousands_sep] => ,
[positive_sign] =>
[negative_sign] => -
[int_frac_digits] => 2
[frac_digits] => 2
[p_cs_precedes] => 1
[p_sep_by_space] => 0
[n_cs_precedes] => 1
[n_sep_by_space] => 0
[p_sign_posn] => 3
[n_sign_posn] => 0
[grouping] => Array ([0] => 3)
[mon_grouping] => Array ([0] => 3)
)