PHP code example of ied3vil / language-switcher
1. Go to this page and download the library: Download ied3vil/language-switcher library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ied3vil / language-switcher example snippets
php artisan vendor:publish
'web' => [
.
.
.
\ied3vil\LanguageSwitcher\Middleware\LanguageSwitcherMiddleware::class,
],
<ul class="dropdown-menu">
<li><a href="{{ url('lang/en') }}"><img src="/img/flags/en.png" alt="">{{ trans('locale.en') }}</a></li>
<li><a href="{{ url('lang/dk') }}"><img src="/img/flags/dk.png" alt="">{{ trans('locale.dk') }}</a></li>
<li><a href="{{ url('lang/sw') }}"><img src="/img/flags/sw.png" alt="">{{ trans('locale.sw') }}</a></li>
</ul>