- Joined
- May 15, 2008
- Messages
- 683
- Reaction score
- 693
1st... include this in you'r index.php
2 step... make folder with name "lang"
when u make this folder make and 2 files "en.php" and "bg.php"
in "en.php" set this :
in bg.php set this :
ok this is rdy... now... open again your index.php make this :
"<a href="index.php"><?php echo _INDEX_; ?>"
and at least set this what ever u want :
this is link for lang selecting
Code:
<?php
$lang=$_GET['lang'];
define("_ADMINISTRATOR_EMAIL_", "[email protected]");
if($lang=="en"){
@include("lang/en.php");
if(!@include("lang/bg.php"))
{echo "<h2>Lang error !</h2>\n<b>@cannot include <i>english</i> lang file</b><br />\nPlease report this error to the administrator at <a href=mailto:"._ADMINISTRATOR_EMAIL_.">"._ADMINISTRATOR_EMAIL_."</a> !";exit; }
}
if($lang==NULL){
@include("lang/bg.php");
if(!@include("lang/bg.php"))
{echo "<h2>Lang error !</h2>\n<b>@cannot include <i>bulgarian</i> lang file</b><br />\nPlease report this error to the administrator at <a href=mailto:"._ADMINISTRATOR_EMAIL_.">"._ADMINISTRATOR_EMAIL_."</a> !";exit; }
}
if($include!="done"){echo"What is your job here? go away!";exit;}
?>
2 step... make folder with name "lang"
when u make this folder make and 2 files "en.php" and "bg.php"
in "en.php" set this :
Code:
<?php
$include="done";
define("_LANG_", "<a href=?lang=bg>[BG]</a>");
define("_INDEX_", "Home page");
?>
in bg.php set this :
Code:
<?php
$include="done";
define("_LANG_", "<a href=?lang=en>[EN]</a>");
define("_INDEX_", "Начало");
?>
ok this is rdy... now... open again your index.php make this :
"<a href="index.php"><?php echo _INDEX_; ?>"
and at least set this what ever u want :
Code:
<center>Language: <?php echo _LANG_; ?></center>