Forums / Setup & design / No fractional digits if price is an integer

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

No fractional digits if price is an integer

Author Message

Julian Seiss

Friday 17 October 2008 6:30:42 am

Hallo,

iam looking for a solution to remove the fractional digits if the a price is an interger.

Locale Settings:
Symbol=€
Name=Euro
ShortName=EUR
DecimalSymbol=.
ThousandsSeparator=,
FractDigits=2
PositiveSymbol=
NegativeSymbol=-
PositiveFormat=%p%q %c
NegativeFormat=%p%q %c

e.g.
Using 15|l10n('currency') returns 15.00 €

Is it possible that l10n returns 15 € when the given digit is an integer without setting the FractDigits to 0? If the given digit is an float, l10n should keep on returning a price with fractional digits.

Thanks already!