Jump to:

23450 Posts in 18899 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Formatting German Numbers

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 482 Views
  • Silverfish
    Community Member
    59 Posts

    Formatting German Numbers Link to this post

    Hi All,

    in our current Project we have a lot of German Prices / Number. They look like 1.034,98, so the delimiters are exactly the other way than american (international?).
    Is there a way to reconfigure the general outputted format in all templates, formfields and CMS formfieds to that format?

    Of course i found


    but this seems only to support formats for date and time formats.

    As always, I would be grateful for any hint!


  • Devlin
    Community Member
    215 Posts

    Re: Formatting German Numbers Link to this post

    setlocale(LC_ALL, array('de_DE.UTF-8','de_DE') ); does format numbers with a comma as a decimal seperator. But this is generally a bad idea, because it is not working with everything -- and things easily get really messed up.
    It is better just to check the locale and format the output for the template resp. input of the form with a wrapper method.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.