Hi, I’m trying to deal with decimal numbers in Yii, but I have some problems:
I need to display 123,45 instead of 123.45
I’ve tried the following in my Yii I18n file:
‘decimalFormat’ => ‘#.##0,##’, //two digits after comma
‘scientificFormat’ => ‘#E0’,
‘percentFormat’ => ‘#,##0%’,
‘currencyFormat’ => ‘¤#.##0,00;(¤#.##0,00)’,
but when I call
$numberFormatter->formatDecimal($model->myDecimalValue), Yii returns 1,690 instead of 1,69
Another thing:
Sometimes I need to show ,00 two digits after comma and sometimes three digits ,000 after comma, how do I do this?
Thanks in advance
:>))