Last active
December 23, 2015 08:19
-
-
Save sinamiandashti/6606797 to your computer and use it in GitHub Desktop.
aaab.ir multilang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
if (array_key_exists('lang', $_GET)) { | |
$currentlang = $_GET['lang']; | |
} else { | |
$currentlang = 'en'; | |
} | |
$langdataArray = array( | |
'texten' => 'textfa', | |
); | |
function _tr($text,$langdata,$lang = 'en') { | |
if ($lang == 'en') return $text; | |
return $langdata[$text]; | |
} | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>گروه آب</title> | |
<link href="css/main.css" rel="stylesheet" type="text/css"/> | |
</head> | |
<body> | |
<? echo _tr('texten',$langdataArray,'fa') ?> | |
<? echo _tr('texten',$langdataArray,'en') ?> | |
<? echo _tr('texten',$langdataArray,$currentlang) ?> | |
<div class="container"> | |
<div class="logo"><img src="img/logo2.png" width="153" height="87"></div> | |
<div class="des"><img src="img/aab.png" width="1000"></div> | |
<div class="links"> | |
<a href="/aab" class="aab pull-right"></a> | |
<a href="/aabcenter" class="aabcenter pull-left"></a> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment