Hi all. Trying to do multiple languages on the website but che did not get me
Here is what is currently done. There are 2 folders, EN and en in each folder there is a file lang.lng one Russian the other English. For example, the contents of the file lang.lng
<?php$lang = array('glav1'\t\t\t\t\t => 'Main', 'game2' => 'Game', 'forum3' => 'Forum', 'overver4' => 'Server', ); ?>
In index file written
$tpl->set('{lang}', $_SESSION['lang']);
Forth in the attached file goes as
$checkLang = (isset($_GET['lang']) and in_array($_GET['lang'], array ('EN', 'en'))) ? $_GET['lang'] : 'EN'; if(!$checkLang){ $checkLang = $_SESSION['lang']; } include SYSTEM_DIR.'/system_lang/'.$checkLang.'/lang.lng';
Forms for change of language
Tried to withdraw $checkLang outputs EN/en. When you navigate to another page "EN/en" immediately becomes EN.
How to make to display languages with the lang file.and lng in the transition to another page does not change the language.