@if(is_plugin_active('language')) @php $type ??= 'desktop'; $supportedLocales = Language::getSupportedLocales(); $languageDisplay = setting('language_display', 'all'); @endphp @if ($supportedLocales && count($supportedLocales) > 1) @if($type === 'desktop')
@if (setting('language_switcher_display', 'dropdown') === 'dropdown') @if ($languageDisplay === 'all' || $languageDisplay === 'flag')
{!! language_flag(Language::getCurrentLocaleFlag(), Language::getCurrentLocaleName()) !!}
@endif @if ($languageDisplay === 'all' || $languageDisplay === 'name') {{ Language::getCurrentLocaleName() }} @endif
@else
@foreach ($supportedLocales as $localeCode => $properties) @continue($localeCode === Language::getCurrentLocale()) @if ($languageDisplay === 'all' || $languageDisplay === 'flag') {!! language_flag($properties['lang_flag'], $properties['lang_name']) !!} @endif @if ($languageDisplay === 'all' || $languageDisplay === 'name') {{ $properties['lang_name'] }} @endif @endforeach
@endif
@else
@if ($languageDisplay === 'all' || $languageDisplay === 'flag') {!! language_flag(Language::getCurrentLocaleFlag(), Language::getCurrentLocaleName(), 24) !!} @endif
@if ($languageDisplay === 'all' || $languageDisplay === 'name') {{ Language::getCurrentLocaleName() }} @endif
@endif @endif @endif