Re: Removing comma's on outputted integers
Jonathan Revusky <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
${myNumber?c}
The ?c built-in means that you are outputting for the "computer"
locale. Otherwise, it tries to display the number correctly given the
default locale conventions.
JR
On Tue, Jan 12, 2010 at 11:26 AM, Jordan Mendler <[email protected]> wrote:
> Hi all,
>
> I am new to Freemarker, and can't figure out how to display integers without
> comma groupings. For instance, I want to display 25000 but instead
> freemarker displays 25,000.
>
> I am seeing lots of things online, such as setting number_format, using the
> c function, locales, and other options, but none of them seem to work. I
> think I somehow need set setGroupingUsed(false) in the NumberFormat within
> the Freemarker Configuration object, but can't quite figure out how.
> setNumberFormat() takes a String so seems to be difference.
>
> Can someone please point me in the right direction here?
>
> I am using Freemarker standalone for XML processing, in a fairly plain way,
> with construction like this:
> Configuration fmConfig = new Configuration();
> fmConfig.setDirectoryForTemplateLoading(new File( directory ));
> fmConfig.setObjectWrapper(new DefaultObjectWrapper());
>
>
> Thanks so much,
> Jordan
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>
>
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev