Trouble While Changing Language of Multi-language script
<p>I made a multi-language website .
It contains only two languages : English and French.
The default language is English and the second language is French
English works perfectly in the website but French doesn't because while changing the language to French using the URL (?lang=fr) I get random letters (in this case I got 'F') and if I switch to (?lang=de) I got 'D') it means that I get to first letter of the varibale $_GET["lang"]
This is the code of my lang.php file</p>

<pre><code>&lt;?php
session_start(); 
if(isset($_GET['lang']))
 {
  $lang = $_GET['lang'];
  $_SESSION['lang'] = $lang;
  setcookie('lang', $lang, time() + (3600 * 24 * 30));
 }

  else if(isset($_SESSION['lang'])) {$lang = $_SESSION['lang'];}

  else if(isset($_COOKIE['lang'])) {$lang = $_COOKIE['lang'];}

  else {$lang = 'fr';}

  if($lang=='fr'){$lang_dir = 'fr.php';}
  else if ($lang=='en') {$lang_dir = 'en.php';}
  else {$lang_dir = 'fr.php';}

  include 'administration/includes/lang/'.$lang_dir;

   ?&gt;
</code></pre>
