Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jul 16, 2009 @ 14:29
    Sebastiaan Janssen
    0

    Why are dates in Dutch format?

    When I use:

    umbraco.library:LongDate($currentPage/@updateDate)

    The date is nicely formatted and shows the day name. I had not seen anything odd on my site, but I just got a comment on my blog letting me know that the date format was Dutch, which is absolutely correct.

    I just don't know why, can anybody explain? I can fix it just fine, I just want to know where the language is coming from so I can keep it in mind for the future.

    Thanks!

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Jul 16, 2009 @ 14:33
    Morten Bock
    101

    A guess would be that if you haven't set any language/hostnamse inside umbraco, it will use the locale from the servers settings. I've even experienced that it used the language settings from the useraccount running the application pool.

  • Ron Brouwer 273 posts 768 karma points
    Jul 16, 2009 @ 14:35
    Ron Brouwer
    0

    Hi Sebastiaan,

    The date is formatted using the current culture i suppose

    http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.currentculture.aspx

    Or do you mean something else?

    Ron

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jul 16, 2009 @ 14:42
    Sebastiaan Janssen
    0

    Thanks Morten, excellent stuff, that helped and I didn't have to change the date format :-)

    Ron: Yup, that's exactly what it was doing, just didn't know it was doing this by default in LongDate. But it does make sense, Umbraco cannot determine what else should be used of course.

  • Ron Brouwer 273 posts 768 karma points
    Jul 16, 2009 @ 14:50
    Ron Brouwer
    0

    You can specify the default using the following:

    <configuration>
       <system.web>
          <globalization
               culture="en-US"
               uiCulture="de-DE"
            />
       </system.web>
    </configuration>

     

  • Jay Walker 10 posts 38 karma points
    Aug 24, 2009 @ 21:07
    Jay Walker
    0

    Ron,

    In which config file would you place the default globalization values?

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Aug 24, 2009 @ 21:10
    Peter Dijksterhuis
    0

    Jay,

    you should edit the web.config for that.

    Note there is allready a globalization-tag, just add culture and uiUlture to it.

    HTH,

    Peter

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies