如何将PHP strtotime翻译为本地语言[重复]

This question already has an answer here:

I have this line

<?php
echo date('H:i, d F Y',strtotime($i->date_start));
?>

Which outputs:

20:24, Saturday, 07 December 2013

How do I translate it to my local language?

</div>

You could use str_ireplace with an array of searches and an array of replacements.

$monthsDaysEn = array('January','February','March','Saturday','etc'); //populate with all months/days you want translated
$monthsDaysEs = array('enero','febero','marzo','Sabado','etc'); //populate in same order with their counterparts

$datestr = "20:24, Saturday, 07 March 2013";

$translated = str_ireplace($monthsEn,$monthsEs,$datestr);

echo $translated;