1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Locales: Removed a lot of existing locale handling

There was a lot of locale handling to get correct/expected date
formatting within the app.
Carbon now has built-in locale content rather than us needing to target
specific system locales.

This also removes setting locale via Carbon directly.
Carbon registers its own Laravel service provider which seems to
accurately pull the correct locale from the app.

For #4555
This commit is contained in:
Dan Brown
2023-09-17 22:02:12 +01:00
parent b42e8cdb63
commit 78bf11cf65
2 changed files with 47 additions and 92 deletions

View File

@ -27,7 +27,7 @@ class Localization
view()->share('locale', $userLocale);
// Set locale for system components
$this->localeManager->setAppLocale($userLocale);
app()->setLocale($userLocale->appLocale());
return $next($request);
}