@{
var umbracoDate = Umbraco.Content(item.Id).CreateDate;
var formattedDate = umbracoDate.ToString("d. MMMM yyyy", new CultureInfo("da-DK"));
//you could always get the CultureInfo off CurrentCulture, but this is a nice test
}
@formattedDate
I was only checking up on this problem when i was running it on localhost (en-US OS), but I didn't think of checking our staging webserver, to see if it was present there. (which is set up correctly with hostname and culture)
So it was indeed not a problem, when its hosted on a proper server, thanks Kasper Holm.
Changing language for month names
Hi, I want to print out the month names in a different language, than the default english. Im printing it out like this:
But it will display it like this:
I have tried doing this in my web.config file:
But it does not change the output. Then i have tried doing this:
This works, so it reverts back to danish, but it seems like an odd way to change it. (what if it was a multilingual site?)
Isn't there/shouldn't there be a way of telling Umbraco which to use as default? Or let it fall back on browser/web server defaults?
Best regards Daniel
It might be as simple as this, haven't tried:
Hey Daniel
Have you set a hostname and culture for your website ? :)
I was only checking up on this problem when i was running it on localhost (en-US OS), but I didn't think of checking our staging webserver, to see if it was present there. (which is set up correctly with hostname and culture)
So it was indeed not a problem, when its hosted on a proper server, thanks Kasper Holm.
and
Did indeed also do the trick :) Thanks Daniel
Awesome cummunity again to the rescue :)
No problem had that issue loads of times ;)
is working on a reply...