money_format formatting. You can only control the position of the {symbol} and the {value} and they are the only two tokens we support (though admittedly there aren't really many other permutations left).XF\Data\Currency class and extend/modify the getCurrencyData method.'USD' => ['code' => 'USD', 'symbol' => '$', 'precision' => 2, 'phrase' => 'currency.usd', 'fa' => 'fa-dollar-sign'],
'USD' => ['code' => 'USD', 'symbol' => '$', 'precision' => 0, 'phrase' => 'currency.usd', 'fa' => 'fa-dollar-sign'],
1234.50 would become 1235 in that case due to rounding.There may be a delay before changes are rolled out to the XenForo Community.Make the appropriate usage of a language's currency_format value more clear.
Hi @Chris D !I mean if it was significant enough for you to want to modify it either with a direct code edit or an add-on then you would extend/edit theXF\Data\Currencyclass and extend/modify thegetCurrencyDatamethod.
PHP:'USD' => ['code' => 'USD', 'symbol' => '$', 'precision' => 2, 'phrase' => 'currency.usd', 'fa' => 'fa-dollar-sign'],
Would become:
PHP:'USD' => ['code' => 'USD', 'symbol' => '$', 'precision' => 0, 'phrase' => 'currency.usd', 'fa' => 'fa-dollar-sign'],
Though note that a value of1234.50would become1235in that case due to rounding.
What do you mean?Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.1.10).
Change log:
There may be a delay before changes are rolled out to the XenForo Community.
Where is this "XF/Data/Currency exacly?
src/XF/Data/Currency.phpThanks !src/XF/Data/Currency.php
I mean if it was significant enough for you to want to modify it either with a direct code edit or an add-on then you would extend/edit theXF\Data\Currencyclass and extend/modify thegetCurrencyDatamethod.
PHP:'USD' => ['code' => 'USD', 'symbol' => '$', 'precision' => 2, 'phrase' => 'currency.usd', 'fa' => 'fa-dollar-sign'],
Would become:
PHP:'USD' => ['code' => 'USD', 'symbol' => '$', 'precision' => 0, 'phrase' => 'currency.usd', 'fa' => 'fa-dollar-sign'],
Though note that a value of1234.50would become1235in that case due to rounding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.