What’s the best way to use languages and calculate numbers.
I am having the problem that on a multi language site the decimal separator
e.g.
german => ‘,’
english => ‘.’
is different, thus working with functions like number_format() does seem to break. Giving the usual error:
A non well formed numeric value encountered
is there any way to define that on all languages it’s using the same separator, or any other solution to not getting bothered with that? when not using number_format() it errors out while just doing simple $a * $b calculations.
If you use the same values in all languages, you might as well set translate to false. If the values are different, I don’t think there is such a settting.
with (float) the english version works and calculation does not give any sort of error, however on the german version the numbers get rounded downwards… so decimals do not work like that.