2022-01-04 09:03:03 +00:00
|
|
|
<div class="tab-pane mt-3" id="language">
|
|
|
|
<form method="POST" enctype="multipart/form-data" class="mb-3"
|
2022-01-14 12:34:37 +00:00
|
|
|
action="{{ route('admin.settings.update.languagesettings') }}">
|
2022-01-04 09:03:03 +00:00
|
|
|
@csrf
|
|
|
|
@method('PATCH')
|
|
|
|
|
|
|
|
<div class="row">
|
2022-01-14 18:08:38 +00:00
|
|
|
<div class="col-md-3">
|
2022-01-04 09:03:03 +00:00
|
|
|
<div class="form-group">
|
2022-01-05 14:19:48 +00:00
|
|
|
<!-- AVAILABLE LANGUAGES -->
|
2022-01-14 12:34:37 +00:00
|
|
|
<label for="languages">{{ __('Available languages') }}:</label>
|
2022-01-04 09:03:03 +00:00
|
|
|
|
2022-01-14 12:34:37 +00:00
|
|
|
<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>
|
2022-01-05 14:03:29 +00:00
|
|
|
@endforeach
|
2022-01-04 09:03:03 +00:00
|
|
|
</select>
|
|
|
|
|
2022-01-05 14:19:48 +00:00
|
|
|
|
|
|
|
<!-- DEFAULT LANGUAGE -->
|
2022-01-14 12:34:37 +00:00
|
|
|
<label for="defaultLanguage">{{ __('Default language') }}: <i data-toggle="popover"
|
|
|
|
data-trigger="hover"
|
|
|
|
data-content="{{ __('The fallback Language, if something goes wrong') }}"
|
|
|
|
class="fas fa-info-circle"></i></label>
|
2022-01-04 09:03:03 +00:00
|
|
|
|
2022-01-14 12:34:37 +00:00
|
|
|
<select id="defaultLanguage" style="width:100%" class="custom-select" name="defaultLanguage"
|
|
|
|
required autocomplete="off">
|
|
|
|
<option value="{{ config('SETTINGS::LOCALE:DEFAULT') }}" selected>
|
|
|
|
{{ __(config('SETTINGS::LOCALE:DEFAULT')) }}</option>
|
|
|
|
@foreach (config('app.available_locales') as $lang)
|
|
|
|
<option value="{{ $lang }}">{{ __($lang) }}</option>
|
2022-01-05 14:03:29 +00:00
|
|
|
@endforeach
|
2022-01-04 09:03:03 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2022-01-05 14:19:48 +00:00
|
|
|
<!--DATATABLE LANGUAGE -->
|
2022-01-14 12:34:37 +00:00
|
|
|
<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>
|
2022-01-05 14:03:29 +00:00
|
|
|
<input x-model="datatable-language" id="datatable-language" name="datatable-language" type="text"
|
2022-01-14 12:34:37 +00:00
|
|
|
required value="{{ config('SETTINGS::LOCALE:DATATABLES') }}"
|
|
|
|
class="form-control @error('datatable-language') is-invalid @enderror">
|
2022-01-05 14:03:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-01-05 12:30:05 +00:00
|
|
|
|
2022-01-05 14:19:48 +00:00
|
|
|
<!-- AUTO TRANSLATE -->
|
2022-01-05 14:03:29 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<input value="true" id="autotranslate" name="autotranslate"
|
2022-01-14 12:34:37 +00:00
|
|
|
{{ config('SETTINGS::LOCALE:DYNAMIC') == 'true' ? 'checked' : '' }} type="checkbox">
|
|
|
|
<label for="autotranslate">{{ __('Auto-translate') }} <i data-toggle="popover" data-trigger="hover"
|
|
|
|
data-content="{{ __('If this is checked, the Dashboard will translate itself to the Clients language, if available') }}"
|
|
|
|
class="fas fa-info-circle"></i></label>
|
2022-01-04 09:03:03 +00:00
|
|
|
|
2022-01-14 12:34:37 +00:00
|
|
|
<br />
|
2022-01-05 14:19:48 +00:00
|
|
|
|
|
|
|
<!-- CLIENTS CAN CHANGE -->
|
2022-01-05 14:03:29 +00:00
|
|
|
<input value="true" id="canClientChangeLanguage" name="canClientChangeLanguage"
|
2022-01-14 12:34:37 +00:00
|
|
|
{{ config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true' ? 'checked' : '' }} type="checkbox">
|
|
|
|
<label for="canClientChangeLanguage">{{ __('Let the Client change the Language') }} <i
|
|
|
|
data-toggle="popover" data-trigger="hover"
|
|
|
|
data-content="{{ __('If this is checked, Clients will have the ability to manually change their Dashboard language') }}"
|
2022-01-05 14:03:29 +00:00
|
|
|
class="fas fa-info-circle"></i></label>
|
2022-01-04 09:03:03 +00:00
|
|
|
|
|
|
|
</div>
|
2022-01-05 14:19:48 +00:00
|
|
|
<button class="btn btn-primary">{{ __('Save') }}</button>
|
|
|
|
</form>
|
2022-01-04 09:03:03 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
document.addEventListener('DOMContentLoaded', (event) => {
|
|
|
|
$('.custom-select').select2();
|
|
|
|
})
|
|
|
|
</script>
|