how to easier setup custom number format

alekz <[email protected]> Tue, 28 Nov 2017 08:58:50 -0700 (MST)
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
Hi, everyone.
Advise me please, how I can implement easier number format:
I need format like this : "1 000,10" (with group Separator " "(space) and
decimalSeparator "," ),
and if number have decimal part <0 like 1 000,00 don't show decimal = 1 000
and if number have decimal part >0  -- show two symbol after coma like 1
000,10???


I implemented it's now too difficult

I set  in javaClass
Freemarker.configuration.setLocale("hu") ;
Freemarker.configuration.setNumber format("##0,00");

and   into template I used replace like ${amoun?replace(',00','')}

but in this case I have to write replace for all tag wich contains number ((


thanks)



--
Sent from: http://freemarker.624813.n4.nabble.com/freemarker-devel-f626829.html

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot