I'm trying to get PHP dates to work cross language. The language code will be supplied according to the logged in user's language setting.
I thought I could do this:
setlocale(LC_ALL, 'de_DE.UTF-8');
echo strftime('%A %B %Y');
But the output is:
Wednesday April 2011
Whereas I would have expected:
Mittwoch April 2011
(April is the same in English and German)
Is this not the correct way to use the strftime
function? If not, is there an alternative method?