Symfony Get Locale From Request In Controller

[Solved] Symfony Get Locale From Request In Controller | Php Frameworks Symfony - Code Explorer | yomemimo.com
Question : symfony get locale from request in controller

Answered by : enzo-beauchamp

use Symfony\Component\HttpFoundation\Request;
public function index(Request $request)
{ $locale = $request->getLocale();
}

Source : https://symfony.com/doc/current/translation/locale.html | Last Update : Thu, 28 Jul 22

Answers related to symfony get locale from request in controller

Code Explorer Popular Question For Php Frameworks Symfony