[development] code proposal: localization of currency, ...

Ivan Sergio Borgonovo mail at webthatworks.it
Wed Oct 17 17:33:13 UTC 2007


On Wed, 17 Oct 2007 17:47:09 +0200
Hans Salvisberg <drupal at salvisberg.com> wrote:

> Forget about currency. Currency is completely unrelated to the
> user's language, and it certainly shouldn't change, just because a
> user changes their language.

Well you can express amounts in dollars, euros, yuan with different
formats as you express floats.

Eg. I'm expecting to read
€ 1.234,56
or
1.234,56 EUR
French people may expect something like:
1.234€56
the - sign can take different places:
- $ 1.234,56
$ -1.234,56
etc...
an American may expect to read
€ 1,234,56
in other countries the symbol of the currency may be put after the
number etc...
site owner may decide that French people may see currency formatted
in some way and English people see them formatted differently for the
*same* currency.
They may decide to use ISO or just the traditional format of that
place.
Providing a sort of PHP date format will just solve the issue and let
people provide the format they prefer and show the format accordingly
to the language chosen.

Making it more general could mean adding:
- sign position
- decimal/thousands separator
- major and minor currency symbols

Unless you'd like to add support for non decimal systems as MRO and
MGA. If this is a blocker for acceptance I could write a more
generalised function.
Other stuff could be included in the system described above.
Even number formats have a wider range (some people group by 2
digit). I'm not aware of any other more generalised format.

So... no interest at all in having localisation of currency and float
format?

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the development mailing list