In my testing environment, I’m trying to output dates in my own language (Dutch). I do this with the PHP-function strftime() and by using setlocale().
But somehow Local doesn’t seem to support changes through setlocale, the setlocale value stays at ‘C’, after trying to change it. How to do this, so I can properly test this part of my code?
/* Set locale to Dutch */
setlocale(LC_ALL, 'nl_NL');
/* Output: vrijdag 22 december 1978 */
echo strftime("%A %e %B %Y", mktime(0, 0, 0, 12, 22, 1978));
This should output ‘vrijdag 22 december 1978’, but I get ‘Friday 22 December 1978’.