mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Enabled translation when not logged in
Reads from the Accept-Language HTTP header. Also fixed some encoding for ES translations. Fixes #375
This commit is contained in:
@ -46,7 +46,7 @@ class HomeController extends Controller
|
||||
* @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function getTranslations() {
|
||||
$locale = trans()->getLocale();
|
||||
$locale = app()->getLocale();
|
||||
$cacheKey = 'GLOBAL_TRANSLATIONS_' . $locale;
|
||||
if (cache()->has($cacheKey) && config('app.env') !== 'development') {
|
||||
$resp = cache($cacheKey);
|
||||
|
Reference in New Issue
Block a user