mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-17 17:11:06 +02:00
Fix and complete tests
This commit is contained in:
@ -27,11 +27,12 @@ class SetLanguage
|
||||
$lang = SettingService::get('lang');
|
||||
|
||||
if($lang === 'browser') {
|
||||
$lang = config('app.fallback_locale');
|
||||
|
||||
if ($request->hasHeader("Accept-Language")) {
|
||||
// We only keep the primary language passed via the header.
|
||||
$lang = head(explode(',', $request->header("Accept-Language")));
|
||||
}
|
||||
else $lang = config('app.fallback_locale');
|
||||
}
|
||||
|
||||
// If the language is not available (or partial), strings will be translated using the fallback language.
|
||||
|
Reference in New Issue
Block a user