laravel-localization
laravel-localization copied to clipboard
Language flags
I'm not sure if it's in your package, but is it possible to have language flag icons to change languages instead of text?
I think it's helpful.
https://github.com/mcamara/laravel-localization/pull/371#issuecomment-258438015
I have worked around this issue by doing this
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
<a class="dropdown-item" rel="alternate" hreflang="{{ $localeCode }}"
href="{{ LaravelLocalization::getLocalizedURL($localeCode, null, [], true) }}">
@if($properties['native'] == "English")
<i class="flag-icon flag-icon-gb"></i>
@elseif($properties['native'] == "العربية")
<i class="flag-icon flag-icon-sa"></i>
@endif
{{ $properties['native'] }}
</a>
@endforeach
I know it's not the best solution but I got what I need. 🤪