[development] code proposal: localization of currency, ...
earnie at users.sourceforge.net
Mon Oct 22 12:12:05 UTC 2007
Quoting Ivan Sergio Borgonovo <mail at webthatworks.it>:
> B) if you've a multi-language site administrators will be able to
> specify many formats. The fact that language and localisation are one
> thing for drupal is another problem, because if you're dealing with 2
> localisations that share the same language but not the same string
> format you'll have to "duplicate" content.
This comes down to user options of representations. The user selects
the format for floating point and the format for currency. The two
have separate formats because non-currency floating point is likely to
have different representation. The hardest part is knowing which
format to use when representing the data to the user; i.e. is this
number representing currency or non-currency.
When it comes to accounting systems, floating numbers should be avoided
and all data should be stored and processed as integers to avoid
rounding issues while processing. Only at the time of representation
do we present the fractions by dividing by the most significant
fraction (e.g. 100). At the time of input we multiply by the most
significant fraction and round as necessary. This also has a benefit
of processing faster as integer processing is faster than decimal
Earnie -- http://for-my-kids.com/
More information about the development