Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.0
Component:
Commerce
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Sep 2011 at 16:51 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
m_wiking commentedComment #2
rszrama commentedThere's an FAQ for this: http://www.drupalcommerce.org/faq/currency-format
Incidentally, all it really recommends is that you come post an issue for your currency and provide some examples so we know how to format it properly. Can you type out a few full numbers as you would need them formatted? I need at least one number with a decimal value and one over a thousand.
Comment #3
m_wiking commentedHere is examples on how Dong should be displayed:
5.000₫
10.000₫
50.000₫
500.000₫
If you go in 1 mil you type in 1.000.000₫ and so on and so forth.
The hào (minor_unit) is now worth so little that it is no longer issued.
Comment #4
rszrama commentedThis should do it then, right?
Comment #5
m_wiking commentedThanks so much for this. I just tried the patch and it works. The only thing is that the ₫ should come directly after the numbers like this: 260.000₫
With this patch it's like this: 260.000 ₫
Is it possible to change?
I just looked in to the hook_commerce_currency_info(). Maybe I can use commerce_currency_format and call a custom callback and remove the space?
Comment #6
rszrama commentedHmm, we can always remove that if it's not useful for any currency. I'm not sure why I implemented the space, so let's check with currencies like the Euro to see if it's even necessary.
Comment #7
m_wiking commentedI think your computer managed to change the format of the vietnamese character.
It should be like this: 'symbol' => 'đ',
Right now it got a underscore in it: 'symbol' => '₫',
Comment #8
rszrama commentedOk, I fixed that and committed. I'll still see what we can do about commerce_currency_format(). Maybe we don't need that space between the number and the currency symbol for any currency.
Comment #9
m_wiking commentedThanks, I saw that it was committed to the latest dev version of Commerce.
Comment #10
rszrama commentedLet's get a good answer on this in the next week or two for the 1.1 release.
Comment #11
firfin commentedHi,
Being Dutch and thus European I think I can chip in here. Europa is a collection of nations and so surprisingly ;) , there is no single standard. As far as I can tell the official Dutch spelling dictates the symbol (€ 5) before the amount. But in French the symbol comes after the amount (5 €).
Preferences of course stemming from how the original currency was spelled.
Both do require a space between the two though.
Then again, there are probably countries that don't use the space between the two.
I think this has to be a somewhat flexible setting.
Hope this helps.
BTW the same goes for the 'thousands' separator, this can be space, comma, or dot apparantly (depending on country)
Comment #12
olafkarsten commentedHi, I will second firfin - both is possible in EU before and after, but both should have a space (though you will often see it without a space). Often letters (EUR) are used instead of € Symbol. So we should have a way to theme/set this in all possible variants. As a default setting I think, € 100.00 or EUR 100.00 - both would be okay. In short - in either way, we EUNA's (EU-Natives) ;) - need the space.
BTW: I haven't looked at this in Detail. Is there a way to theme/set this easy?
Comment #13
rszrama commentedIt seems perhaps the best thing we can do is add additional formatting options for currencies to specify whether or not there should be spacing between the currency symbol / currency code and the price amount. To preserve the current behavior, it will default to a single space for each.
As to the question of a theme function... there isn't any right now, but it would probably be good to think about (for example, to apply nowrap to prices with spaces). For now you can just specify a custom format callback for your currencies and do what you need in there.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/c4df518