How to include different languages in a PHP website?
<p>in a website I am creating I want to include several languages.</p>

<p>Below is how I identify what language should I show.</p>

<pre><code>    &lt;?php
    $pagename = $_SERVER["REQUEST_URI"];
       if (strpos($pagename,'?en') !== false) 
         {
            echo 'english';
here is when I have to include a language template file for english language.
         }
    ?&gt;
</code></pre>

<p>My goal is to include language template files instead of duplicating all of my websites for any language.</p>

<p>So what I think about it, is for example in <code>index.php</code> the variable will be the same for all languages, but the content will be changed.</p>

<pre><code>&lt;div id="main"&gt;
&lt;?php echo $main_description; ?&gt;
&lt;/div&gt;
</code></pre>

<p>How should I include a language file for this to work?</p>

<pre><code>$main_description ="this is the main description written in english"
</code></pre>
