diff --git a/src/Exporter/Transformer/Handler/IntegerToMoneyFormatHandler.php b/src/Exporter/Transformer/Handler/IntegerToMoneyFormatHandler.php index 280ac674..006da943 100644 --- a/src/Exporter/Transformer/Handler/IntegerToMoneyFormatHandler.php +++ b/src/Exporter/Transformer/Handler/IntegerToMoneyFormatHandler.php @@ -28,7 +28,12 @@ public function __construct(array $allowedKeys, string $format = '%.2n') */ protected function process($key, $value): ?string { - return money_format($this->format, $value / 100); + $locale = ''; + if(isset($GLOBALS['request']) && $GLOBALS['request']) { + $locale = $GLOBALS['request']->getLocale(); + } + $fmt = new \NumberFormatter( $locale, \NumberFormatter::CURRENCY ); + return $fmt->formatCurrency($value/100, "EUR"); } protected function allows($key, $value): bool