Parašė avice· 2014 Bir. 24 15:06:42
#5
Koda dedam po siu funkciju maincore.php faile:
// Fetch the settings from the database
t.y pries sekanti
php komentara, daviau tik pavidzy, turetu veikt. Beto reiketu visas kalbas tureti.
// keiciam kalba
if(!isset($_COOKIE['kalba'])) {
$kalba = unserialize(@file_get_contents('http://www.geoplugin.net/php.gp?ip='.$_SERVER['REMOTE_ADDR']));
if(isset($kalba['geoplugin_countryName'])) {
setcookie("kalba", $kalba['geoplugin_countryName'], (time()+60*60*24*30));
}
}elseif(file_exists(BASEDIR."locale/".$kalba['geoplugin_countryName']."/global.php")){
$settings['locale'] = $_COOKIE['kalba'];
}
Redagavo avice· 2014 Bir. 24 15:06:16