Forum OpenACS Development: list-builder & internationalization

Hi,

We've found an issue using the aggregate listbuilder functionality with the numbers format (decimal separator). If you use a fr_FR locale or a nl (dutch) locale, the decimal separator is a comma and when the aggregate is doing the summation it seems to fall over since the [expr] function is expecting a number with a 'dot' decimal separator and we couldn't find any code doing the 'format conversion' before invoking the [expr] function.

Have you come across with this situation?

I'm just wondering if we've missed something in our acs-lang & templating settings or if this is just a missing conversion on the aggregate code.

Thanks for your help

Collapse
Posted by Emmanuelle Raffenne on
Hi Enrique,

One solution is to have 2 columns, one for the localized number and one with the "not localized" one, so the element would be:

number {
label "A number"
display_col localized_number
aggregate sum
}

however the result of the aggregate function won't be localized. I don't know if there's anything in list builder that would allow to format the result for display.

Collapse
Posted by Derick Leony on
You could also use one column with display_eval

number {
label "A number"
display_eval {[lc_numeric $number]}
aggregate sum
}

Cheers!

Collapse
Posted by Enrique Catalan on
Thanks a lot Emmanuelle & Derick ! The problem was with one of our own customized lc_* procs which wasn't picking the decimal separator properly from the message key, after I got the latest oacs official version it worked fine with both locales fr_FR and NL!