Jon W
Well-known member
In XenForo_Input, replacing:
with something more like:
would allow users to enter decimals based on their selected locale.
Similarly in XenForo_DataWriter for TYPE_FLOAT.
PHP:
case self::FLOAT:
$data = floatval($data);
break;
with something more like:
PHP:
case self::FLOAT:
$language = XenForo_Visitor::getInstance()->getLanguage();
$data = str_replace($language['thousands_separator'], "", $data);
$data = str_replace($language["decimal_point"], ".", $data);
$data = floatval($data);
break;
Similarly in XenForo_DataWriter for TYPE_FLOAT.