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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -