HTTP_ACCEPT_LANGUAGE is not set when executing the app from the console.
This commit is contained in:
parent
4f0b2c6c8f
commit
dfdbea6214
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ $languages = [
|
|||
'tr' => 'turkish',
|
||||
];
|
||||
|
||||
$language_code = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
||||
$language_code = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) : 'en';
|
||||
|
||||
$config['language'] = isset($_SERVER['HTTP_ACCEPT_LANGUAGE'], $languages[$language_code])
|
||||
? $languages[$language_code]
|
||||
|
|
Loading…
Reference in a new issue