Fix missing filter when switching language

This commit is contained in:
gplane 2017-04-26 21:07:42 +08:00
parent ffc2de2e4a
commit e0fee86ea7

View File

@ -8,7 +8,11 @@
<ul class="dropdown-menu" role="menu">
@foreach(config('locales') as $code => $langInfo)
@if (!isset($langInfo['alias']))
<li class="locale"><a href="?lang={{ $code }}">{{ $langInfo['name'] }}</a></li>
@if (count($_GET) == 0 || (count($_GET) == 1 && isset($_GET['lang'])))
<li class="locale"><a href="?lang={{ $code }}">{{ $langInfo['name'] }}</a></li>
@else
<li class="locale"><a href="{{ $_SERVER['REQUEST_URI'] }}&lang={{ $code }}">{{ $langInfo['name'] }}</a></li>
@endif
@endif
@endforeach
</ul>