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