title: What's the simplest Php alternative to the Php gettext extension which can be supported by all kind of free hosting
body: <p>I'm using <a href="http://www.zymic.com" rel="nofollow noreferrer">Zymic</a>, its a great hosting but it doesn't support the <strong>php gettext extension</strong>. I'm planning to buy some hosting in the future, but from now I want the simplest solution in order to replace the function of <strong>gettext</strong>, in this case I want to <strong>display different text</strong> (English, Spanish, Chinese, etc...) <strong>without modyfing</strong> the file too much (at least not having to create seaprated files for each language).</p>
  
  <p><strong>I tried something like this:</strong></p>
  
  <pre><code>  &lt;?php
  
      $lang = "";
      switch ($lang) {
          case "en":
              $lang = "Hello World";
              break;
          case "es":
              $lang = 'Hola Mundo';
              break;
      }
  
      ?&gt;
  
      &lt;div&gt;
      &lt;p&gt;&lt;?php echo $lang;?&gt;&lt;/p&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>When I change the <code>$lang</code> variable it works. I'm a PHP beginner and I can't think of a way to <strong>make it change in the browser</strong> (by clicking a link).</p>
  
  <p>Or is there a better way of doing this?</p>