I am using two languages for my Laravel project. The default language is English
. Another language is 'Bangla`. For that, I have created
resources/lang/bn
.Localization middleware
inside Http/Middleware
.Localization class
inside the kernel.php
under middlewareGroups array
.english
and bangla
in the menubar for choosing language <li><a href="{{ 'locale/en' }}">English</a></li>
<li><a href="{{ 'locale/bn' }}">Bangla</a></li>
So while I clicked any language my site URL is not changing but the menubar language is changed.
Now my question is how can I find the selected current language in my blade template while my site URL remains same for selecting any language ?
you can use
{{ app()->getLocale() }}