mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Updated user language select to use correct default
- Updated localisation system to take note of system defaul locale before replacing the current locale Fixes #1316
This commit is contained in:
@ -51,6 +51,7 @@ class Localization
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$defaultLang = config('app.locale');
|
||||
config()->set('app.default_locale', $defaultLang);
|
||||
|
||||
if (user()->isDefault() && config('app.auto_detect_locale')) {
|
||||
$locale = $this->autoDetectLocale($request, $defaultLang);
|
||||
@ -63,8 +64,6 @@ class Localization
|
||||
config()->set('app.rtl', true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
app()->setLocale($locale);
|
||||
Carbon::setLocale($locale);
|
||||
$this->setSystemDateLocale($locale);
|
||||
|
Reference in New Issue
Block a user