Load the booking frontend in the primary language of the client's browser unless it is overridden by manual language selection.

This commit is contained in:
Yannis Rammos 2019-10-28 02:43:54 +02:00
parent 14bbd793bf
commit 6b39b121b6

View file

@ -82,7 +82,38 @@ $config['url_suffix'] = '';
|
*/
$config['language'] = defined('Config::LANGUAGE') ? Config::LANGUAGE : 'english';
$config['language'] = (null !== $_SERVER['HTTP_ACCEPT_LANGUAGE']
?
array(
'ar' => 'arabic',
'bu' => 'bulgarian',
'zh' => 'chinese',
'da' => 'danish',
'nl' => 'dutch',
'en' => 'english',
'fi' => 'finnish',
'fr' => 'french',
'de' => 'german',
'el' => 'greek',
'hi' => 'hindi',
'hu' => 'hungarian',
'it' => 'italian',
'ja' => 'japanese',
'pl' => 'polish',
'pt' => 'portuguese',
'pt' => 'portuguese',
'ro' => 'romanian',
'ru' => 'russian',
'sk' => 'slovak',
'es' => 'spanish',
'tr' => 'turkish'
)[substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)]
:
(defined('Config::LANGUAGE')
? Config::LANGUAGE
: 'english'
)
);
/*
|--------------------------------------------------------------------------