1
timgno
Auto Detect Language
  • 2016/4/1 8:25

  • timgno

  • Module Developer

  • Posts: 1504

  • Since: 2007/6/21


Hi All!

To Core Team...!!!

In the file session.php, I've noticed in a variable 'securityLevel', the possibility of implement this hack.

The likely source code could be this:


$lang substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 02);

$langConfig = array("en" => "english/""it" => "italian/"

                            
"de" => "deutsch/""fr" => "french/"

                            
"default" => "english/");

if(
array_key_exists($lang$langConfig)) {

    
$language $langConfig[$lang];

} else {

    
$language $langConfig['default'];

}

header('Location: ' $language);


Login

Who's Online

160 user(s) are online (121 user(s) are browsing Support Forums)


Members: 0


Guests: 160


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits