currencyCode manual :
3-letter ISO 4217 currency code indicating the default currency to use
Try setting currencyCode to 'EUR' (although this doesn't seem to be that important) and put the formatter in an array
[ 'attribute' => 'Score', 'format' => [ 'currency', 'EUR', [ \NumberFormatter::MIN_FRACTION_DIGITS => 0, \NumberFormatter::MAX_FRACTION_DIGITS => 0, ] ], ],
This requires the PHP intl extension to be installed. The extension status can be checked by calling extension_loaded('intl') . If there is no extension, your best bet is probably to write custom formatting.
<?php namespace app\components; class Formatter extends \yii\i18n\Formatter { public function asRoundedCurrency($value, $currency) { return $this->asInteger(round($value)) . ' ' . $currency; } }
Use it instead of standard formatting and then call it like this:
[ 'attribute' => 'Score', 'format' => ['roundedCurrency', 'EUR'], ]
It also allows you to freely set the currency symbol.
source share