Hi,
I've been thinking how to handle decimal numbers when using ad_form & template::form API with central european locale settings ( e.g. numbers in the format 1.200,00 ).
At the moment, if I switch the lang to fr_FR and if a user types, for example, 1200,00. The ad_form validation for a float widget doesn't work returning a message 'Invalid decimal number "1200,00"'.
I've found that the template::data::validate::float (on acs-templating/tcl/data-procs.tcl) is not picking the decimal separator from acs-lang. I presume it is expecting to receive the openacs canonical representation for that number but it is not. It seems that the template system is not translating the localized numbers to the canonical representation.
I hacked that validation proc to quickly translate the value for that number and it seems to be working but I'm not sure if this is the best place to do this or maybe this has already been done in a better way.
Have ever had this issue?
Thanks in advance!