title: What is the MessageFormatter Class in PHP 5.3 good for?
body: <p>With PHP +5.3 and 6 comes a couple new i18n classes. One of them is the <a href="http://www.php.net/manual/en/messageformatter.formatmessage.php" rel="nofollow noreferrer">MessageFormatter</a> Class which seems to be an incomplete idea. I'm hoping I'm just overlooking something.</p>
  
  <p>The example given seems to show that if you ALREADY KNOW THE LANGUAGE YOU ARE USING, then this class will format the numbers for you correctly. </p>
  
  <pre><code>&lt;?php
  echo msgfmt_format_message("en_US", "{0,number,integer} monkeys on {1,number,integer} trees make {2,number} monkeys per tree", array(4560, 123, 4560/123));
  echo msgfmt_format_message("de", "{0,number,integer} Affen auf {1,number,integer} Bäumen sind {2,number} Affen pro Baum", array(4560, 123, 4560/123));
  ?&gt;
  </code></pre>
  
  <p>Which renders:</p>
  
  <pre><code>4,560 monkeys on 123 trees make 37.073 monkeys per tree
  4.560 Affen auf 123 Bäumen sind 37,073 Affen pro Baum
  </code></pre>
  
  <p>Now if you already know the langauge (which is why you have to write it) then why don't you just use the <a href="http://php.net/manual/en/function.number-format.php" rel="nofollow noreferrer">number_format()</a> function where you need proper numbers? Why do you need an entire class for this?</p>
  
  <p>An example of doing something other than formatting numbers would really help.</p>