Ok, what’s wrong here?
header('Content-type: text/html; charset=utf-8');
setlocale(LC_ALL, NULL);
setlocale(LC_ALL, 'pt_BR');
echo "<p>São Paulo, " . date("d \d\e F \d\e Y", time()) . "</p>";
echo "<p>Preferred locale on this system is '" . setlocale(LC_ALL, NULL) . "'</p>";
echoes:
São Paulo, 24 de April de 2012
Preferred locale on this system is 'Portuguese_Brazil.1252'
Tried also something like:
setlocale(LC_ALL, 'Portuguese_Brazil.1252', 'bra', 'brazil', 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8', 'portuguese', 'portuguese-brazil', 'ptb');
But nothing makes the ‘aPril’ becomes ‘aBril’.
thx.
PS: Document is UTF.8 (without BOM) formated on IDE.
I had the same issue on a shared hosting and just made my own locale function.
UPDATE:
Well if you have installed the language just use strftime() instead of date()
From PHP documentation:
Try this: