Setlocale (LC_ALL, 'it_IT'); set, but still dates in English

I have this code that through json_decode retrieves my last tweets, their date, etc.

<?php setlocale(LC_ALL, 'it_IT'); ?> <?php include("twitter_auth.php"); echo "<ul style='color:#6E6E6E'>"; foreach ($twitter_data as $tweet) { if (!empty($tweet)) { $text = $tweet->text; $text_in_tooltip = str_replace('"', '', $text); // replace " to avoid conflicts with title="" opening tags $id = $tweet->id; $time = strftime('%d %B', strtotime($tweet->created_at)); $username = $tweet->user->name; } echo '<li><span title="'; echo $text_in_tooltip; echo '">'; echo $text . "</span><br> <a href=\"http://twitter.com/"; echo $username ; echo '/status/'; echo $id ; echo '"><small>'; echo $time; echo '</small></a> - <a href="http://twitter.com/intent/tweet?in_reply_to='; echo $id; echo '"><small>rispondi</small></a> - <a href="http://twitter.com/intent/retweet?tweet_id='; echo $id; echo '"><small>retweet</small></a> - <a href="http://twitter.com/intent/favorite?tweet_id='; echo $id; echo '"><small>preferito</small></a></li>'; } echo '</ul>'; ?> 

The problem is that $ time prints something like February 03, although there is setlocale (LC_ALL, 'it_IT') ;. What mistake? How can I display dates in Italian? System: PHP 5.4.11 and nginx (on Ubuntu server).

EDIT: I also ran dpkg-reconfigure locales:

 Generating locales... en_US.UTF-8... up-to-date it_IT.UTF-8... up-to-date Generation complete. 
+6
source share
1 answer

Cool as it is, I decided to change the line:

 <?php setlocale(LC_ALL, 'it_IT.UTF-8'); ?> 
+15
source

All Articles