Multiple localizations mod
Posted: Sat May 08, 2010 1:09 pm
/*************************************
Title: Multiple localizations
Version: 1.7
Author: Martijn van der Kooij
Demo:
Download:
Website: http://www.pecsforall.com/gbook/gbook.php
Short description: I wanted to show the user with different languages depending on their browser settings. I came up with the following
*************************************/
In Settings.php remove
In Settings.php replace
with
And make sure you have the latests versions of the langugae files from the other Mods
I'm also working on a French translation (well, somebody else does it for me
)
Some of the uestions needs a translations, so feel free to add a message with the proper translation....
Title: Multiple localizations
Version: 1.7
Author: Martijn van der Kooij
Demo:
Download:
Website: http://www.pecsforall.com/gbook/gbook.php
Short description: I wanted to show the user with different languages depending on their browser settings. I came up with the following
*************************************/
In Settings.php remove
Code: Select all
$settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
Code: Select all
/* Language file */
$settings['language']='language.inc.php';
Code: Select all
/* Language file */
if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "nl")>0){
$settings['language']='language_nl.inc.php';
$settings['spam_question']='Type <b>ABCDE</b> hieronder om aan te tonen dat u geen robot bent:';
}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "bg")>0){
$settings['language']='language_bg.inc.php';
//}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "sv")>0){
// $settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
// $settings['language']='language_sv.inc.php';
}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "fr")>0){
$settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
$settings['language']='language_fr.inc.php';
}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "es")>0){
$settings['spam_question']='Escribe <b>ABCDE</b> debajo para comprobar que no eres un robot:';
$settings['language']='language_es.inc.php';
}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "it")>0){
$settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
$settings['language']='language_it.inc.php';
}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "de")>0){
$settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
$settings['language']='language_de.inc.php';
}else if (strpos(" ". $_SERVER["HTTP_ACCEPT_LANGUAGE"], "ru")>0){
$settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
$settings['language']='language_ru.inc.php';
}else{
$settings['spam_question']='Type <b>ABCDE</b> below to show you are not a robot:';
$settings['language']='language.inc.php'; // the default is en
}
I'm also working on a French translation (well, somebody else does it for me

Some of the uestions needs a translations, so feel free to add a message with the proper translation....