phplaravellaravel-localization

How to get the current language in Laravel while the url is not changing,


I am using two languages for my Laravel project. The default language is English. Another language is 'Bangla`. For that, I have created

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 ?


Solution

  • you can use {{ app()->getLocale() }}