title: Using setLocale(LC_TIME) for localising week/month names in a website
body: <p>I have a site that supports these 5 languages:</p>
  
  <ul>
  <li>English</li>
  <li>French</li>
  <li>German</li>
  <li>Italian</li>
  <li>Spanish</li>
  </ul>
  
  <p>Users can interchange between the languages as they want. I have a page that displays weekday date month in text like:</p>
  
  <p>Monday 12th January</p>
  
  <p>My code to this is:</p>
  
  <pre><code>setlocale(LC_TIME, $_SESSION['lang'] . "_" . strtoupper($_SESSION['lang']));
  
  foreach($data['Location']['Day'] as $key =&gt; $val) {
    $date = strftime("%A %e, %B", strtotime($val['@attributes']['val']));
    $data['Location']['Day'][$key]['date'] = $date;
  }
  </code></pre>
  
  <p>On localhost, when I switch between the languages, the week and month switch and work fine. However on the server, it always shows up in English for me. _SESSION['lang'] works fine and gets changed, so I don't know why it's not showing French when the locale should be fr_FR.</p>
  
  <p>Could it be because there is no locales installed on the server? Or is there a better way to localise these strings?</p>
  
  <p>EDIT: I've also tried appending ".utf8" in the setlocale call like this:</p>
  
  <pre><code>setlocale(LC_TIME, $_SESSION['lang'] . "_" . strtoupper($_SESSION['lang']) . ".utf8");
  </code></pre>
  
  <p>But that didn't work either (didn't work on localhost, nor on the server)</p>