Laravel-Tongue
Laravel-Tongue copied to clipboard
Aliases with dialect()->current('locale') doesn't work as expected
Describe the bug
I'm trying to use the configuration aliases
config/localization
'aliases' => [
'www' => 'ar',
],
I've also enabled ar
in the supportedLocales
list
the issue here is dialect()->current('ar')
always return ar.domain.local
I expected to return www.domain.local
@if(tongue()->current() == 'en')
<li>
<a href="{{ dialect()->current('ar') }}">
<i class="icon fas fa-globe text-primary"></i> en
</a>
</li>
@endif
aslo
@foreach (dialect()->translateAll(true) as $locale => $url)
<a href="{{ $url }}">{{ $locale }}</a>
@endforeach
returns
<a href="http://fr.infoeg.local:8000/cairo/categories">fr</a>
<a href="http://ar.infoeg.local:8000/cairo/categories">ar</a>
while expected
<a href="http://fr.infoeg.local:8000/cairo/categories">fr</a>
<a href="http://www.infoeg.local:8000/cairo/categories">ar</a>
I'm not sure if that is a bug or I misused it
Great job 💯 Thanks a lot 👍