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>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button class="btn btn-primary">{{ __('Save') }}</button>
|
<button class="btn btn-primary">{{ __('Save') }}</button>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -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 -->
|
||||||
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue