[Freemarker-devel] how to easier setup custom number format
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
From: alekz <zammer@i.ua> - 2017-11-28 16:15:22
|
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 |