@php $other = other_locale(); $routeName = request()->route()?->getName(); $params = request()->route()?->parameters() ?? []; $href = $routeName ? route($routeName, array_merge($params, ['locale' => $other])) : url('/'.$other); if (request()->getQueryString()) { $href .= '?'.request()->getQueryString(); } $enabled = feature($other === 'ur' ? 'locale.urdu' : 'locale.english'); @endphp @if($enabled) {{ config('platform.locales.'.$other.'.name') }} @endif