title: Most efficient way to do language file in PHP?
body: <p><strong>Questions Updated instead of making a new question...</strong></p>
  
  <p>I really want to provide a few alternative languages other then English on my social network site I am building,  this will be my first time doing any kind of language translation so please bear with me.<br>
  I am researching so I am al ear and open to ideas and I have a lot already here is are the questions.  </p>
  
  <p><strong>1)</strong><br>
  What does i18n mean, I see it often when researching language translation on SO?</p>
  
  <p><strong>2)</strong><br>
  Most people say use <a href="http://php.net/manual/en/intro.gettext.php" rel="noreferrer">gettext</a> PHP has an extension or support for it,<br>
  well I have been researching it and I have a basic understanding of it, as far as I can tell it is a lot of extra work to go this route,<br>
  I mean coding my site to use it's functions ie;  <strong>_('hello world i'm in English for now')</strong> or else <strong>gettext('hello world i'm in English for now')</strong> is no problem as any route I go will require that.<br>
  But then you have to install gettext on your server and get it working,<br>
  then use some special editors to create special files and compile them I think?  </p>
  
  <p>Sounds like a pain, I understand this is supposed to be the best route to go though, well everyone seems to say it is.<br>
  So can someone tell me why this is the route to go?</p>
  
  <p><strong>3)</strong><br>
  I really like the simplicity of this approach, just building a language array and calling the phrase you need in a function like the example below
   , you would then just include a file with the appropriate language array.  </p>
  
  <p>What I really want to know is, would this be the less better performance method on a high traffic and fairly large site compared to using gettext and if so can you explain why please?</p>
  
  <pre><code>&lt;?PHP
  //Have seperate language files for each language I add, this would be english file
  function lang($phrase){
      static $lang = array(
          'NO_PHOTO' =&gt; 'No photo\'s available',
          'NEW_MEMBER' =&gt; 'This user is new'
      );
      return $lang[$phrase];
  }
  //Then in application where there is text from the site and not from users I would do something like this
  echo lang('NO_PHOTO');  // No photo's available would show here
  ?&gt;
  </code></pre>
  
  <p>* some code used from brianreavis's answer below</p>