My multilanguage website still doesn't work.... really it works after a
refresh:
when I first start the browser, I get the following error:
Warning: main(lang..inc.php) [function.main]: failed to open stream: No
such file or directory in C:\wampp2\htdocs\set_language.php on line 6
Fatal error: main() [function.require]: Failed opening required
'lang..inc.php' (include_path='\wampp2\php\pear\') in
C:\wampp2\htdocs\set_language.php on line 6
then I make refresh and it works good. Here's my code:
main.php
<?
session_start();
define("DEFAULT_LANGUAGE", 'ge');
if (!isset($_SESSION['lang'])) {
$_SESSION['lang'] = DEFAULT_LANGUAGE;
}
include("set_language.php");
?>
set_language.php
<?php
if (isset($_GET['lang']))
{
$lang = $_GET['lang'];
}
require_once("lang.{$lang}.inc.php"); That's Line 6!!!
?>
<td align="left" width="50"><a href="?lang=ge"><? echo "DEUTSCH"
?></a></td>
<td align="left" width="50"><a href="?lang=en"><? echo "ENGLISH"
?></a></td>
<td align="left" width="50"><a href="?lang=sp"><? echo "ESPAÑOL"
?></a></td>
Any help will be welcomed.