@php
$supportedLocales = Language::getSupportedLocales();
if (empty($options)) {
$options = [
'before' => '',
'lang_flag' => true,
'lang_name' => true,
'class' => '',
'after' => '',
];
}
$languageDisplay = setting('language_display', 'all');
$showRelated = setting('language_show_default_item_if_current_version_not_existed', true);
@endphp
@if (setting('language_switcher_display', 'dropdown') == 'dropdown')
!is_in_admin(),
'me-2' => is_in_admin(),
])>
@if ($supportedLocales && count($supportedLocales) > 1)
{!! Arr::get($options, 'before') !!}
@if (Arr::get($options, 'lang_flag', true) && ($languageDisplay == 'all' || $languageDisplay == 'flag'))
{!! language_flag(Language::getCurrentLocaleFlag(), Language::getCurrentLocaleName()) !!}
@endif
@if (Arr::get($options, 'lang_name', true) && ($languageDisplay == 'all' || $languageDisplay == 'name'))
{{ Language::getCurrentLocaleName() }}
@endif
{!! Arr::get($options, 'after') !!}
@endif
@if (!is_in_admin())
@include(JobBoardHelper::viewPath('dashboard.partials.currency-switcher'))
@endif
@else
@if ($supportedLocales && count($supportedLocales) > 1)
@foreach ($supportedLocales as $localeCode => $properties)
@if ($localeCode != Language::getCurrentLocale())
@if (Arr::get($options, 'lang_flag', true) && ($languageDisplay == 'all' || $languageDisplay == 'flag'))
{!! language_flag($properties['lang_flag'], $properties['lang_name']) !!}
@endif
@if (Arr::get($options, 'lang_name', true) && ($languageDisplay == 'all' || $languageDisplay == 'name'))
{{ $properties['lang_name'] }}
@endif
@endif
@endforeach
@endif
@include(JobBoardHelper::viewPath('dashboard.partials.currency-switcher'))
@endif