Redirect customer to his language used by navigator

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

No reply :rolleyes:

?

Now it works :D

Thnx

Nice self talk :)

Glad you solved it… as you did not get any answer seems that nobody got a clue on how to solve this… so it would be helpfull for future readers of this post if you could write a bit on how you solved this problem…