Fix language definition in blade view

This commit is contained in:
Bubka 2023-02-19 22:59:20 +01:00
parent 5e5e50d053
commit 373ffa14c8
2 changed files with 4 additions and 3 deletions

View File

@ -4,8 +4,8 @@
use App\Events\ScanForNewReleaseCalled; use App\Events\ScanForNewReleaseCalled;
use App\Facades\Settings; use App\Facades\Settings;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Auth;
class SinglePageController extends Controller class SinglePageController extends Controller
{ {
@ -31,6 +31,7 @@ public function index()
'subdirectory' => $subdir, 'subdirectory' => $subdir,
'isDemoApp' => config('2fauth.config.isDemoApp') ? 'true' : 'false', 'isDemoApp' => config('2fauth.config.isDemoApp') ? 'true' : 'false',
'isTestingApp' => config('2fauth.config.isTestingApp') ? 'true' : 'false', 'isTestingApp' => config('2fauth.config.isTestingApp') ? 'true' : 'false',
'lang' => App::getLocale(),
'locales' => collect(config('2fauth.locales'))->toJson(), /** @phpstan-ignore-line */ 'locales' => collect(config('2fauth.locales'))->toJson(), /** @phpstan-ignore-line */
]); ]);
} }

View File

@ -1,9 +1,9 @@
<!DOCTYPE html> <!DOCTYPE html>
<html data-theme="{{ $userPreferences['theme'] }}" lang="{{ $userPreferences['lang'] }}"> <html data-theme="{{ $userPreferences['theme'] }}" lang="{{ $lang }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="{{ __('commons.2fauth_description') }}" lang="{{ $userPreferences['lang'] }}"> <meta name="description" content="{{ __('commons.2fauth_description') }}" lang="{{ $lang }}">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no, viewport-fit=cover"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no, viewport-fit=cover">
<meta name="csrf-token" content="{{csrf_token()}}"> <meta name="csrf-token" content="{{csrf_token()}}">
<meta name="robots" content="noindex, nofollow"> <meta name="robots" content="noindex, nofollow">