commerceguys / intl

A PHP internationalization library, powered by CLDR data.
MIT License
361 stars 45 forks source link

Investigate quirks when rendering prices in Farsi #74

Open bojanz opened 5 years ago

bojanz commented 5 years ago

Our number format for Farsi ("fa") puts the currency symbol before the amount.

However, PHP's native NumberFormatter varies the symbol location based on the currency:

$formatter = new \NumberFormatter('fa', \NumberFormatter::CURRENCY);
echo $formatter->formatCurrency('645000', 'USD'); // Symbol before the amount
echo $formatter->formatCurrency('645000', 'IRR'); // Symbol after the amount

This could be related to #65, where our logic is too simplistic.