I managed to solve all ths. :)
Anyway another strange thing is happening! :P After some upgrade from PHP 5.4.2 to 5.4.8 (I did every step, so 5.4.2 to 5.4.3, then 5.4.4 to 5.4.5..) - I don't know which upgrade is the "guilty" one :P - the setlocale thing stopped working..
This is my code (I removed the other parts and left the one interesting):
Code: [Select]
As you can see I set setlocale to it_IT, so strftime('%e %B',strtotime($decode[$i]['created_at'])) should print dates in italian (and it did before upgrading to X PHP version).. for some reason it's in english...
Anyway another strange thing is happening! :P After some upgrade from PHP 5.4.2 to 5.4.8 (I did every step, so 5.4.2 to 5.4.3, then 5.4.4 to 5.4.5..) - I don't know which upgrade is the "guilty" one :P - the setlocale thing stopped working..
This is my code (I removed the other parts and left the one interesting):
<?php
setlocale(LC_ALL, 'it_IT');
?>
<div class="box" style="padding-left:20px">
<h2 id="twitter_title">TWITTER</h2>
<?php
$json = wp_remote_get("http://api.twitter.com/1/statuses/user_timeline/lorenzoraffio.json?count=9", true);
$decode = json_decode($json['body'], true);
echo "
<ul style='color:#6E6E6E'>";
$count = count($decode); //counting the number of status
for($i=0;$i<$count;$i++){ echo '
<li>'.$decode[$i]['text'].'<br><a href='; echo '"http://twitter.com/#!/'.$decode[0][user][name].'/status/'.$decode[$i][id].'"><small>'. strftime('%e %B',strtotime($decode[$i]['created_at'])) ."</small></a> - <a href='http://twitter.com/intent/tweet?in_reply_to=".$decode[$i][id]."'><small>rispondi</small></a> - <a href='http://twitter.com/intent/retweet?tweet_id=".$decode[$i][id]."'><small>retweet</small></a> - <a href='http://twitter.com/intent/favorite?tweet_id=".$decode[$i][id]."'><small>preferito</small></a></li>";} echo "
</ul>
";
?>
</div>
As you can see I set setlocale to it_IT, so strftime('%e %B',strtotime($decode[$i]['created_at'])) should print dates in italian (and it did before upgrading to X PHP version).. for some reason it's in english...



