Hello,
i want to redirect customer to his language used by navigator.
i have in config -> main.php :
return array(
'name' => '....Com',
'defaultController'=>'site',
'language'=>'fr',
but i want to redirect customer to his language used by navigator. so that’s the code which i want to add :
function iptoc ( $ip , $type = 1 ) {
return file_get_contents ( "http://nl.ae/iptocapi.php?type=" . $type . "&ip=" . $ip );
}
$country = iptoc ( $_SERVER [ 'REMOTE_ADDR' ]);
If (( $country == "fr" )) {
echo "fr" ;
}
Else{
echo "en" ;
}
so please how i do that for change it : ‘language’=>‘fr’, to language used by customer ?
Thanks