Re: Removing comma's on outputted integers
Jordan Mendler <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
JR, How can I set this globally, so that all integer output assumes computer formatting by default? I tried <#setting locale="computer">, but it did not work. Thanks so much, Jordan On Tue, Jan 12, 2010 at 3:15 AM, Jonathan Revusky <[email protected]> wrote: > ${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 > _______________________________________________ > 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 _______________________________________________ FreeMarker-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freemarker-user