localization, fixes, formatting
This commit is contained in:
parent
7bd0f2a9d3
commit
d89c394ba5
|
@ -24,7 +24,7 @@ class SetLocale
|
||||||
if (Session::has('locale')) {
|
if (Session::has('locale')) {
|
||||||
$locale = Session::get('locale', Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT"));
|
$locale = Session::get('locale', Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT"));
|
||||||
} else {
|
} else {
|
||||||
if (Settings::getValueByKey("SETTINGS::LOCALE:DYNAMIC") == "false") {
|
if (!Settings::getValueByKey("SETTINGS::LOCALE:DYNAMIC")=="true") {
|
||||||
$locale = Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT");
|
$locale = Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT");
|
||||||
} else {
|
} else {
|
||||||
$locale = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);
|
$locale = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);
|
||||||
|
|
|
@ -7,16 +7,20 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
<!-- AVAILABLE LANGUAGES -->
|
||||||
<label for="languages">{{__("Available languages")}}:</label>
|
<label for="languages">{{__("Available languages")}}:</label>
|
||||||
|
|
||||||
<select id="languages" style="width:100%"
|
<select id="languages" style="width:100%"
|
||||||
class="custom-select" name="languages[]"
|
class="custom-select" name="languages[]"
|
||||||
|
required
|
||||||
multiple="multiple" autocomplete="off">
|
multiple="multiple" autocomplete="off">
|
||||||
@foreach(config("app.available_locales") as $lang)
|
@foreach(config("app.available_locales") as $lang)
|
||||||
<option value="{{$lang}}">{{__($lang)}}</option>
|
<option value="{{$lang}}">{{__($lang)}}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- DEFAULT LANGUAGE -->
|
||||||
<label for="defaultLanguage">{{__("Default language")}}: <i data-toggle="popover"
|
<label for="defaultLanguage">{{__("Default language")}}: <i data-toggle="popover"
|
||||||
data-trigger="hover"
|
data-trigger="hover"
|
||||||
data-content="{{__('The fallback Language, if something goes wrong')}}"
|
data-content="{{__('The fallback Language, if something goes wrong')}}"
|
||||||
|
@ -24,17 +28,20 @@
|
||||||
|
|
||||||
<select id="defaultLanguage" style="width:100%"
|
<select id="defaultLanguage" style="width:100%"
|
||||||
class="custom-select" name="defaultLanguage"
|
class="custom-select" name="defaultLanguage"
|
||||||
|
required
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
<option disabled
|
<option
|
||||||
selected>{{__(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT"))}}</option>
|
value="{{\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT")}}"
|
||||||
|
selected>
|
||||||
|
{{__(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DEFAULT"))}}</option>
|
||||||
@foreach(config("app.available_locales") as $lang)
|
@foreach(config("app.available_locales") as $lang)
|
||||||
<option value="{{$lang}}">{{__($lang)}}</option>
|
<option value="{{$lang}}">{{__($lang)}}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--DATATABLE LANGUAGE -->
|
||||||
<label for="datatable-language">Datable Language <i data-toggle="popover"
|
<label for="datatable-language">{{__('Datable language')}} <i data-toggle="popover"
|
||||||
data-trigger="hover"
|
data-trigger="hover"
|
||||||
data-content="{{__('The Language of the Datatables. Grab the Language-Codes from here')}} https://datatables.net/plug-ins/i18n/"
|
data-content="{{__('The Language of the Datatables. Grab the Language-Codes from here')}} https://datatables.net/plug-ins/i18n/"
|
||||||
class="fas fa-info-circle"></i></label>
|
class="fas fa-info-circle"></i></label>
|
||||||
|
@ -45,6 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- AUTO TRANSLATE -->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input value="true" id="autotranslate" name="autotranslate"
|
<input value="true" id="autotranslate" name="autotranslate"
|
||||||
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DYNAMIC")?"checked":"")}}
|
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:DYNAMIC")?"checked":"")}}
|
||||||
|
@ -55,6 +63,8 @@
|
||||||
class="fas fa-info-circle"></i></label>
|
class="fas fa-info-circle"></i></label>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
<!-- CLIENTS CAN CHANGE -->
|
||||||
<input value="true" id="canClientChangeLanguage" name="canClientChangeLanguage"
|
<input value="true" id="canClientChangeLanguage" name="canClientChangeLanguage"
|
||||||
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:CLIENTS_CAN_CHANGE")?"checked":"")}}
|
{{(\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:CLIENTS_CAN_CHANGE")?"checked":"")}}
|
||||||
type="checkbox">
|
type="checkbox">
|
||||||
|
@ -65,11 +75,13 @@
|
||||||
class="fas fa-info-circle"></i></label>
|
class="fas fa-info-circle"></i></label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<button class="btn btn-primary">{{ __('Save') }}</button>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="btn btn-primary">{{ __('Save') }}</button>
|
</div>
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
||||||
|
|
||||||
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
|
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css"/>
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
|
||||||
|
|
||||||
{{-- summernote --}}
|
{{-- summernote --}}
|
||||||
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
|
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
<nav class="main-header sticky-top navbar navbar-expand navbar-dark navbar-light">
|
<nav class="main-header sticky-top navbar navbar-expand navbar-dark navbar-light">
|
||||||
<!-- Left navbar links -->
|
<!-- Left navbar links -->
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
|
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- Language Selection -->
|
<!-- Language Selection -->
|
||||||
@if (\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:CLIENTS_CAN_CHANGE") == 'true')
|
@if (\App\Models\Settings::getValueByKey("SETTINGS::LOCALE:CLIENTS_CAN_CHANGE")=='true')
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link" href="#" id="languageDropdown" role="button" data-toggle="dropdown"
|
<a class="nav-link" href="#" id="languageDropdown" role="button" data-toggle="dropdown"
|
||||||
aria-haspopup="true" aria-expanded="false">
|
aria-haspopup="true" aria-expanded="false">
|
||||||
|
@ -75,9 +75,8 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
|
||||||
<!-- End Language Selection -->
|
<!-- End Language Selection -->
|
||||||
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- Right navbar links -->
|
<!-- Right navbar links -->
|
||||||
|
@ -97,7 +96,7 @@
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
@foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5)
|
@foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5)
|
||||||
as $notification)
|
as $notification)
|
||||||
<a href="{{ route('notifications.show', $notification->id) }}" class="dropdown-item">
|
<a href="{{ route('notifications.show', $notification->id) }}" class="dropdown-item">
|
||||||
<span class="d-inline-block text-truncate" style="max-width: 150px;"><i
|
<span class="d-inline-block text-truncate" style="max-width: 150px;"><i
|
||||||
class="fas fa-envelope mr-2"></i>{{ $notification->data['title'] }}</span>
|
class="fas fa-envelope mr-2"></i>{{ $notification->data['title'] }}</span>
|
||||||
|
@ -203,8 +202,7 @@ as $notification)
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('servers.index') }}"
|
<a href="{{ route('servers.index') }}" class="nav-link @if (Request::routeIs('servers.*')) active @endif">
|
||||||
class="nav-link @if (Request::routeIs('servers.*')) active @endif">
|
|
||||||
<i class="nav-icon fa fa-server"></i>
|
<i class="nav-icon fa fa-server"></i>
|
||||||
<p>{{ __('Servers') }}
|
<p>{{ __('Servers') }}
|
||||||
<span class="badge badge-info right">{{ Auth::user()->servers()->count() }} /
|
<span class="badge badge-info right">{{ Auth::user()->servers()->count() }} /
|
||||||
|
@ -215,8 +213,7 @@ as $notification)
|
||||||
|
|
||||||
@if ((env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID')) || env('APP_ENV', 'local') == 'local')
|
@if ((env('PAYPAL_SECRET') && env('PAYPAL_CLIENT_ID')) || env('APP_ENV', 'local') == 'local')
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('store.index') }}"
|
<a href="{{ route('store.index') }}" class="nav-link @if (Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
|
||||||
class="nav-link @if (Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
|
|
||||||
<i class="nav-icon fa fa-coins"></i>
|
<i class="nav-icon fa fa-coins"></i>
|
||||||
<p>{{ __('Store') }}</p>
|
<p>{{ __('Store') }}</p>
|
||||||
</a>
|
</a>
|
||||||
|
@ -245,8 +242,7 @@ as $notification)
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('admin.api.index') }}"
|
<a href="{{ route('admin.api.index') }}" class="nav-link @if (Request::routeIs('admin.api.*')) active @endif">
|
||||||
class="nav-link @if (Request::routeIs('admin.api.*')) active @endif">
|
|
||||||
<i class="nav-icon fa fa-gamepad"></i>
|
<i class="nav-icon fa fa-gamepad"></i>
|
||||||
<p>{{ __('Application API') }}</p>
|
<p>{{ __('Application API') }}</p>
|
||||||
</a>
|
</a>
|
||||||
|
@ -255,16 +251,14 @@ as $notification)
|
||||||
<li class="nav-header">{{ __('Management') }}</li>
|
<li class="nav-header">{{ __('Management') }}</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('admin.users.index') }}"
|
<a href="{{ route('admin.users.index') }}" class="nav-link @if (Request::routeIs('admin.users.*')) active @endif">
|
||||||
class="nav-link @if (Request::routeIs('admin.users.*')) active @endif">
|
|
||||||
<i class="nav-icon fas fa-users"></i>
|
<i class="nav-icon fas fa-users"></i>
|
||||||
<p>{{ __('Users') }}</p>
|
<p>{{ __('Users') }}</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('admin.servers.index') }}"
|
<a href="{{ route('admin.servers.index') }}" class="nav-link @if (Request::routeIs('admin.servers.*')) active @endif">
|
||||||
class="nav-link @if (Request::routeIs('admin.servers.*')) active @endif">
|
|
||||||
<i class="nav-icon fas fa-server"></i>
|
<i class="nav-icon fas fa-server"></i>
|
||||||
<p>{{ __('Servers') }}</p>
|
<p>{{ __('Servers') }}</p>
|
||||||
</a>
|
</a>
|
||||||
|
@ -279,8 +273,7 @@ as $notification)
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ route('admin.store.index') }}"
|
<a href="{{ route('admin.store.index') }}" class="nav-link @if (Request::routeIs('admin.store.*')) active @endif">
|
||||||
class="nav-link @if (Request::routeIs('admin.store.*')) active @endif">
|
|
||||||
<i class="nav-icon fas fa-shopping-basket"></i>
|
<i class="nav-icon fas fa-shopping-basket"></i>
|
||||||
<p>{{ __('Store') }}</p>
|
<p>{{ __('Store') }}</p>
|
||||||
</a>
|
</a>
|
||||||
|
@ -387,31 +380,31 @@ as $notification)
|
||||||
<!-- Control sidebar content goes here -->
|
<!-- Control sidebar content goes here -->
|
||||||
</aside>
|
</aside>
|
||||||
<!-- /.control-sidebar -->
|
<!-- /.control-sidebar -->
|
||||||
</div>
|
</div>
|
||||||
<!-- ./wrapper -->
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
{{-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> --}}
|
{{-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> --}}
|
||||||
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> --}}
|
{{-- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script> --}}
|
||||||
{{-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> --}}
|
{{-- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script> --}}
|
||||||
{{-- <script src="{{ asset('js/adminlte.min.js') }}"></script> --}}
|
{{-- <script src="{{ asset('js/adminlte.min.js') }}"></script> --}}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
|
||||||
<script src="{{ asset('js/app.js') }}"></script>
|
<script src="{{ asset('js/app.js') }}"></script>
|
||||||
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
|
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
|
||||||
<!-- Summernote -->
|
<!-- Summernote -->
|
||||||
<script src="{{ asset('plugins/summernote/summernote-bs4.min.js') }}"></script>
|
<script src="{{ asset('plugins/summernote/summernote-bs4.min.js') }}"></script>
|
||||||
<!-- select2 -->
|
<!-- select2 -->
|
||||||
<script src="{{ asset('plugins/select2/js/select2.min.js') }}"></script>
|
<script src="{{ asset('plugins/select2/js/select2.min.js') }}"></script>
|
||||||
|
|
||||||
<!-- Moment.js -->
|
<!-- Moment.js -->
|
||||||
<script src="{{ asset('plugins/moment/moment.min.js') }}"></script>
|
<script src="{{ asset('plugins/moment/moment.min.js') }}"></script>
|
||||||
|
|
||||||
<!-- Datetimepicker -->
|
<!-- Datetimepicker -->
|
||||||
<script src="{{ asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
|
<script src="{{ asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
|
||||||
|
|
||||||
<!-- Select2 -->
|
<!-- Select2 -->
|
||||||
<script src={{ asset('plugins/select2/js/select2.min.js') }}>
|
<script src={{ asset('plugins/select2/js/select2.min.js') }}>
|
||||||
< script>
|
< script >
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('[data-toggle="popover"]').popover();
|
$('[data-toggle="popover"]').popover();
|
||||||
|
|
||||||
|
@ -421,8 +414,8 @@ as $notification)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
@if (Session::has('error'))
|
@if (Session::has('error'))
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
|
@ -447,7 +440,7 @@ as $notification)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@endif
|
@endif
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue