This question already has an answer here:
I am using this PHP Function, which is working great:
<?php echo date('l, d F Y'); ?>
Today, it outputs Tuesday, 19 November 2013
, but I want it to be in my language. Is there a way I can set variables for each day of the week, and each month of the year, in my language?
Thanks.
</div>
From the docs:
To format dates in other languages, you should use the setlocale() and strftime() functions instead of date().
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);