View File Updated

This commit is contained in:
devansh bawari 2021-06-11 14:15:25 +05:30
parent 821e604fdb
commit fcdfeba06c
1 changed files with 2 additions and 16 deletions

View File

@ -27,23 +27,9 @@
{!! view_render_event('bagisto.shop.layout.header.locale.before') !!}
<div class="d-inline-block">
<div class="dropdown">
@php
$localeImage = null;
@endphp
@foreach (core()->getCurrentChannel()->locales as $locale)
@if ($locale->code == app()->getLocale())
@php
$localeImage = $locale->locale_image;
@endphp
@endif
@endforeach
<div class="locale-icon">
@if ($localeImage)
<img src="{{ asset('/storage/' . $localeImage) }}" onerror="this.src = '{{ asset($localeImage) }}'" alt="" width="20" height="20" />
@elseif (app()->getLocale() == 'en')
<img src="{{ asset('/themes/velocity/assets/images/flags/en.png') }}" alt="" width="20" height="20" />
@if ($currentLocaleImageSource = app(\Webkul\Velocity\Helpers\Helper::class)->getCurrentLocaleImageSource())
<img src="{{ $currentLocaleImageSource }}" alt="" width="20" height="20" />
@endif
</div>