Categories > TinyButStrong general >

param ;locale not for numeric frm?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: rein
Date: 2007-09-04
Time: 13:05

param ;locale not for numeric frm?

I couldn't get this clear from the documentation, but do I understand correctly that the "locale" param does not work for a frm with decimals.

I'm not sure how it is in France, but in Holland we use a comma(,) to seperate decimals and we'd like to use this in TBS. My code looks like this:

[blk.total; frm=0.000,00; locale]
(or [blk.total; frm='€ 0.000.000,00; locale])

Where my php code has the correct setlocale(LC_NUMERIC, 'nl_NL');

if I print numeric data in php, the correct seperator is shown
print (float)1252.1238;
returns correctly: "1252,1238"

Is this something TBS can do? Or am I stretching here;)
By: Skrol29
Date: 2007-09-05
Time: 00:10

Re: param ;locale not for numeric frm?

Hi,

Parameter "locale" works only to display conveniant names of month and days.
For decimal format, just display it with zeros.
[blk.total;frm='0.000,00']
should works too:
[blk.total;frm=0.000,00]

In France, "," is the decimal separator, and " " is the thousand separator.