`class LocalizationMiddleware
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
app()->setLocale($request->segment(1));
URL::default(['locale' => $request->segment(1)]);
return $next($request);
}
}`
{{ __('adminbackend.translate.dashboardText') }}
Merhaba middleware üzerinden multi language sistemi nasıl yapabilirim ?