title: setlocale to fr-FR in PHP and number formatting
body: <p>I am trying to create a French version of one of my sites. I have set <code>setlocale(LC_ALL, 'fr_FR');</code> at the top of my page, and using <code>strftime</code> I am displaying dates correctly in the French style.</p>
  
  <p>However I am having some problems with a number. Part of the page uses data I am getting from a Web Service. I am assigning a returned value to a var like this:</p>
  
  <pre><code>$overallRating = $returnArray['Overall'];
  </code></pre>
  
  <p>I am then using the following code later to format it to 1 decimal place</p>
  
  <pre><code>number_format($overallRating,1)
  </code></pre>
  
  <p>In the English version the overallRating value might be <code>7.5</code> and returns a value such as <code>7.5</code> (the reason for running it through the number_format is if it returns <code>7</code> I want it to display <code>7.0</code>)</p>
  
  <p>However in the French version if I print out the raw $overallRating value I get <code>7,5</code> which looks like it has translated it into french. This would be fine but if I run it through <code>number_format</code> I get the error:</p>
  
  <pre><code>Notice: A non well formed numeric value encountered in /sites/index.php  on line 250
  </code></pre>
  
  <p>Line 250 is the <code>number_format</code> line</p>
  
  <p>I presume the translation to <code>7,5</code> is messing it up, but not sure how to solve this...</p>
  
  <p>Using PHP 5.3 in case there is anything new that helps me</p>