i18n\Formatter $numberFormatterOptions

$numberFormatterOptions public property

A list of name value pairs that are passed to the intl Numberformatter::setAttribute() method of all the number formatter objects created by createNumberFormatter(). This property takes only effect if the PHP intl extension is installed.

Please refer to the PHP manual for the possible options.

For example to adjust the maximum and minimum value of fraction digits you can configure this property like the following:

[
    NumberFormatter::MIN_FRACTION_DIGITS => 0,
    NumberFormatter::MAX_FRACTION_DIGITS => 2,
]
doc_Yii
2016-10-30 17:05:54
Comments
Leave a Comment

Please login to continue.