title: How to use po/pot files with php?
body: <p>I have a <strong>.po</strong> and a <strong>.mo</strong> file in a folder whose address is <strong>/locale/nld_nld/LC_MESSAGES/</strong>. Both the files' names are messages. I've been trying to use the following code:</p>
  
  <p>try.php:</p>
  
  <pre><code>&lt;?php
  require_once("Localization.php");
  echo _("Hello World!");
  ?&gt;
  </code></pre>
  
  <p>the Localization.php goes here:</p>
  
  <pre><code>&lt;?php
  $locale = "nld_nld";
  if (isSet($_GET["locale"])) $locale = $_GET["locale"];
  putenv("LC_ALL=$locale");
  setlocale(LC_ALL, $locale);
  bindtextdomain("messages", "./locale");
  bind_textdomain_codeset("messages", 'UTF-8');
  textdomain("messages");
  ?&gt;
  </code></pre>
  
  <p>Both the try.php and the Localization files are in the same directory. Also, I use <code>xampp</code>. I also implemented the <code>phpinfo();</code>. In the table, in front of 'GetText Support', enabled was mentioned. The <strong>messages.po</strong> and the <strong>messages.mo</strong> files are valid files which I created using poEdit. I'm a windows user. However, when I opened try.php, it simply echoed Hello World! (not its translated string. Also, I've translated the <strong>.po</strong> file 100% (according to <code>poEdit</code>). Still, I'm not getting the results. A little help on this would be appreciated.</p>
  
  <p>Thanks in advance!</p>