About a week ago i was working on a twitter widget for a website. This required some dates to be displayed in Dutch. And i found out the hard way my knowledge on this has faded away over time.
So the code i was working on. Did something like this.
My thought was that by setting the correct locale the dates would appear in the correct language. Wrong!
After a reload i was greeted by the same dates as before. In plain English. Oke no worries. Let’s see what setlocale returns.
That’s not good. Seems like we are missing some locales on the server. Let’s check.
And some more output after that. But not the one i am looking for. But thankfully aptitude was kind enough to provide the missing language packages.
So let’s set the correct locale for this script.
But still no changes. I must be missing something….. Let’s consult the manual. The last line in the examples section is what i was looking for
Duuh! Completely forgot about strftime. Let’s change the code.
ma aug 15 14:55:06 2011
Perfect. That did it.