I am using two languages for my Laravel project. The default language is English
. Another language is 'Bangla`. For that, I have created
- a folder inside
resources/lang/bn
. Localization middleware
insideHttp/Middleware
.- add
Localization class
inside thekernel.php
undermiddlewareGroups array
. - add list item
english
andbangla
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 ?