<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
class NoLocaleController extends AbstractController
{
/**
* @Route("/", name="no_locale")
*/
public function index(Request $request): Response
{
$locale = $request->getLocale();
return $this->redirectToRoute('login', array('_locale' => $locale));
}
}