I don’t think it is possible to stop the filter to translate the $ symbol. I don’t know Arabic, but it seems weird to me that the filter does that. If you agree you could consider sending a feature request to Pixel and Tonic.
To work around the issue now you could set the format option to false and only use the commerceCurrency
filter to convert the value. Then format it for the output manually with help of the number_format
filter.
{% set total = item.total|commerceCurrency(cart.paymentCurrency, convert=true, format=false) %}
{% if cart.paymentCurrency.iso == 'usd' %}
${{ total|number_format(2, '.', ',') }}
{% elseif cart.paymentCurrency.iso == 'eur' %}
{{ total|number_format(2, '.', ',') }} EUR
{% endif %}
Here is how you can apply the manual formatting to select currencies only.
{% if cart.paymentCurrency.iso == 'usd' %}
{% set total = item.total|commerceCurrency(cart.paymentCurrency, convert=true, format=false) %}
${{ total|number_format(2, '.', ',') }}
{% elseif cart.paymentCurrency.iso == 'eur' %}
{% set total = item.total|commerceCurrency(cart.paymentCurrency, convert=true, format=false) %}
{{ total|number_format(2, '.', ',') }} EUR
{% else %}
{{ item.total|commerceCurrency(cart.paymentCurrency, convert=true, format=true) }}
{% endif %}
It’s probably a good idea to use a Twig macro for this snippet.