I'm using processwire and to put the post creation date I used the following code
<?php echo ( date("F j, Y ", $page->created). "at " . date("g:i A", $page->created)); ?></p>
However this code does show the date in English format and I would like to translate it into Portuguese
I'll show you the change I made
<p><span class="glyphicon glyphicon-time"></span> Posted on <?php echo ( date("F j, Y ", $page->created). "at " . date("g:i A", $page->created)); //antes
//Alteração apartir daqui
// strftime("%A, %d de %B de %Y", strtotime( $page->created));
$en = ['','January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
$pt = [' de ', 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'];
echo("<br>");
echo str_replace($en, $pt, strftime("%d de %B de %Y as %H:%M", strtotime($date)));
?>
</p>
What I was before September 2, 2015 at 10:31 AM
After the January 1, 1970 change at 01:00
The dates are different
If someone can add the processwire tag in stackoverflow English already exists