Fix router.php syntax
This commit is contained in:
parent
d342537a59
commit
a95f6203eb
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ define('CONF', parse_ini_file(__DIR__ . '/config.ini', true, INI_SCANNER_TYPED))
|
|||
define('DB', new PDO('sqlite:' . CONF['common']['root_path'] . '/db/servnest.db'));
|
||||
|
||||
$locale = 'en';
|
||||
foreach (explode(',', preg_replace('/[A-Z0-9]|q=|;|-|\./', '', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '') as $client_locale)) {
|
||||
foreach (explode(',', preg_replace('/[A-Z0-9]|q=|;|-|\./', '', $_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? '')) as $client_locale) {
|
||||
if (in_array($client_locale, array_diff(scandir('locales'), ['..', '.']), true)) {
|
||||
$locale = $client_locale;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue