[dev] Questioning Horde_Currencies

Jan Schneider jan at horde.org
Wed May 2 13:58:02 UTC 2007


Zitat von Duck <duck at obala.net>:

> Hode_Currencies is actually a copy of locale with the addition of exchange
> rates.

Yes, I noticed.

> I don't like to stick to server users current locale. It can happen that the
> locale of the user does not exists or for example in Slovenia we move to euro
> but most distributions or current server installations still advertise our
> old currency – tolar.

This is exactly what I've mentioned for not being a valid rationale  
for that module. Whether you might be using Euro or Tolar, you will  
always want to use Slovenian monetary formatting. Of course you won't  
use the default currency from localeconv() but select the appropriate  
currency manually. But you could choose the formatting rules from the  
locale.
Locales not being installed on the system is a moot argument too.  
Formatting still works (using the C locale) if you don't have it  
installed. If you need support for it, you install it. What you are  
actually trying to do is to create a redundant locale database. Beside  
that this is unnecessary duplication, it's much harder for people to  
find correct formatting rules for a locale and insert them manually  
into the database.

> Then with Horde_Currencies you can have multiply fractional digits. An
> piratical example. In customer world 2 fractional digits are normally used.
> But in business word 3 or even 4 digits are often. So for example in  Merk
> admin you enter items in 4 digits, and then you have a website installation
> sowing prices in 2 digits for normal costumers and another site with 3 digits
> for B2B sells. And all you must do is create different tables for you desired
> currencies and they digits.

This is a good point that I wasn't aware of. Are there more examples?  
Because otherwise it would be much easier to simply allow a  
configuration or some kind of setting to override the fraction under  
certain circumstances.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list