Multi Language
Multi Language Settings
Let's add the French language.
- Create a new file fr.json in the fr folder in the
resources/lang
folder and copy the en.json file code in this file. -
You can simply use
{{ __('t-title') }}
in your page to translate. -
Add the below dropdown in the
resources/views/layouts/topbar.blade.php
file in the language dropdown.<!-- item--> <a href="{{ url('index/ar') }}" class="dropdown-item notify-item" data-lang="ar" title="French"> <img src="https://img.themesbrand.com/judia/flags/fr.svg" alt="user-image" class="me-2 rounded" height="18"> <span class="align-middle">French</span> </a>
-
Add the below image case in
resources/views/layouts/topbar.blade.php
.<!-- item--> @case('fr') <img src="{{ URL::asset('build/images/flags/fr.svg') }}" class="rounded" alt="Header Language" height="20"> @break