localization - php how to get the current decimal/thousand separator for a given locale -
i've set locale using setlocale() function let's "en_us".
now i'm trying format currency without thousand separator this:
$currency = number_format($value, 2, '.', '');
that works, have other currencies , want number_format use correct decimal separator according use locale.
is there way current decimal separator somehow, based on locale has been set?
localeconv()
should it. manual:
returns associative array containing localized numeric , monetary formatting information.
here list of language strings recognized setlocale()
on windows.
Comments
Post a Comment