@anonymous-piwik-user opened this issue on December 1st 2013

All (conversion) rates in my Piwik installation were integer valued (1.0%, 2.0%, ) instead of (1.2%, 2.6%, etc.). The reason seems to be the localization of PHP. My Server is located in Germany and float numbers are represented by a decimal comma:

$floatNumber = 10 / 4;
// output: 2,5

However, MySql doesn't understand the comma based floats and just seems to cut of all decimal places resulting in the integer valued rates. I've solved it by adding the following code line somewhere in the code

setlocale(LC_NUMERIC, 'C');

But probably there is a solution in not such a hacky way.

@mattab commented on December 8th 2013

see #4114 format thousands, decimal, abbreviate large numbers locatization l10n

This issue was closed on December 8th 2013
Powered by GitHub Issue Mirror