Answer the question
In order to leave comments, you need to log in
Why does the formatter see itself differently in Yii2?
'formatter' => [
'locale' => 'en-US',
'decimalSeparator' => '.',
'thousandSeparator' => ' ',
'currencyCode' => '$',
]
Formatting currency value failed: 1 Number formatting failed: U_ILLEGAL_ARGUMENT_ERROR
'formatter' => [
'locale' => 'en-US',
'decimalSeparator' => '.',
'thousandSeparator' => ' ',
'currencyCode' => 'USD',
]
Answer the question
In order to leave comments, you need to log in
Check if you and the server have ext_intl installed, the ext_intl version is puffy.
In general, 'currencyCode' should be a 3-letter currency code, but not $.
The symbol can be added like this (in the example, the tenge sign):
'formatter' => [
...
'numberFormatterSymbols' => [
NumberFormatter::CURRENCY_SYMBOL => '₸',
]
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question