Wise people help!
i was trying to make a multilanguage system for my web site and got into trouble
this is how it looks like
examples:
index.php
PHP:--------------------------------------------------------------------------------
<?php
// lets start with setting the language
if ($lang == 'ru')
{
include"lang/ru.php";
}
elseif ($lang == 'cz')
{
include"lang/cz.php";
}
elseif ($lang == 'en')
{
include"lang/en.php";
}
else
{
include"lang/en.php";
}
// end of setting language
?>
<title><?php echo $lang['pagetitle'] ?></title>
<br>
<style type="text/CSS">
body {
background: #FFFFFF;
font-size: 8pt;
font-family: Tahoma;
}
A:link { COLOR: #56728e; TEXT-DECORATION: none; FONT-FAMILY: tahoma; }
A:active { COLOR: #56728e; TEXT-DECORATION: none; FONT-FAMILY: tahoma; }
A:visited { COLOR: #56728e; TEXT-DECORATION: none; FONT-FAMILY: tahoma; }
A:hover { COLOR: #96b2ce; TEXT-DECORATION: bold; FONT-FAMILY: tahoma; }
INPUT, TEXTAREA, SELECT { FONT-SIZE: 8pt; FONT-FAMILY: tahoma; }
</style>
<br><br><br><center><b><?php echo $lang['hello'] ?></center><br><br><br>
Choose your language:
<form method="post" name="lang_form" action="<?php echo $HTTP_REFERER ?>" onSubmit="if(document.jumpbox.f.value == -1){return false;}">
<select name="lang">
<option value="en" selected>English</option>
<option value="ru">Russian</option>
<option value="cz">Czech</option>
</select> <input type="submit" value="Go">
</form>
<a href="index.php?lang=en">English</a> - <a href="index.php?lang=ru">Russian</a> - <a href="index.php?lang=cz">Czech</a>
<br><br><br>
$lang['test_text']<br><br><br><br><p> </p><center>© 2003 <a href=mailto:dimak@volny.cz>Dimak</a></center>
--------------------------------------------------------------------------------
example language file: lang/en.php
PHP:--------------------------------------------------------------------------------
<?php
$lang['pagetitle'] = 'Testpage';
$lang['hello'] = 'Hello, welcome to the test page. You can use every html tag here and it will appear as HTML. like this one: ';
?>
but the problem is it only shows firs leters that are in the lang file
www.intelia.ru
your advices are welcome!
thanks!