-<?php
-
-namespace BookStack\Http\Controllers;
+<?php namespace BookStack\Http\Controllers;
use Activity;
use BookStack\Repos\EntityRepo;
-use BookStack\Http\Requests;
use Illuminate\Http\Response;
use Views;
* @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);
];
if ($locale !== 'en') {
$enTrans = [
- 'common' => trans('common', [], null, 'en'),
- 'components' => trans('components', [], null, 'en'),
- 'entities' => trans('entities', [], null, 'en'),
- 'errors' => trans('errors', [], null, 'en')
+ 'common' => trans('common', [], 'en'),
+ 'components' => trans('components', [], 'en'),
+ 'entities' => trans('entities', [], 'en'),
+ 'errors' => trans('errors', [], 'en')
];
$translations = array_replace_recursive($enTrans, $translations);
}