There is a fault at Hungarian currency. When I change the currency from EUR to HUF, it shows less amount, for example:
it converts 1 184,00 € to 328,738 Ft The problem is, that the coma is used to be a decimal separator at EUR and thousands separator at HUF (however the coma is used to be a decimal separator in Hungary, so it means that it converts the 1000 EUR to 300 HUF only, but in fact the 1000 EUR is 300 000 HUF). What have to be changed to show the currencies in a common format? That the thousands separator and the decimal separator would be the same at all currencies? I would like to set up that the thousands separator would be a space and a decimal separator would be a comma.

In examples:

1 184,00 € ==> 1 184.00 €
328,738 Ft ==> 328 738.00 Ft
$1,483.55 ==> $1 483.55
£2,424.87 ==> £2 424.87


memil’s picture

I am sorry, so the correct need sounds in this way: I would like to set up that the thousands separator would be a space (' ') and a decimal separator would be a point ('.') .

rszrama’s picture

Assigned: memil » Unassigned
Category: bug » support
Status: Active » Postponed (maintainer needs more info)

How are you converting these currencies? If you're using the API, it just converts integers to integers without caring how the number ends up being formatted. Additionally, are you using the Commerce Multicurrency module?

memil’s picture

Yes, I am using Commerce Multicurrency and the conversion is made via European Central Bank. Probably it convers the integers only, but it displays in different ways at different currencies. My need is to be displayed in common format to avoid misunderstandings.

Damien Tournoud’s picture

Title: Faults at multicurrency » Change thousands and decimal separators for Hungarian Forint
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

The way I read this, it is a request to change the thousands and decimal separators for the Hungarian Forint.

Damien Tournoud’s picture

From what I can read over the internet (for example: the Hungarian style guide from Microsoft), the correct configuration for the Hungarian Forint would be:

  • Decimal Separator: ","
  • Thousand Separator: " "

(not that it really matter because the sub-currency of the Forint (the fillér), is not in circulation anymore.)

memil’s picture

Yes, you are right, that the decimal separator is "," and a thousand separator is " " at HUF. But, I would like to use the thousand separator " " and the decimal separator "." at ALL currencies, avoid any misunderstandings, even the official Hungarian (and other) spelling sounds differently. So, how can I do that?

rszrama’s picture

Category: bug » task
Status: Active » Fixed

Ok, I'm going to update the currency format information for HUF. The question of overriding the formatting for every currency to match one format is different altogether. For that your best bet would be to alter the currency info array via hook_commerce_currency_info_alter() and either:

  1. Substitute your own 'format_callback' for every to use a function that forces the same format; you can copy the code out of commerce_currency_format() itself and adjust it accordingly.
  2. Change the 'decimal_separator' and 'thousands_separator' to be whatever you want. You would still use the core 'format_callback' but would simply be altering all currencies to use the same default format options.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.