I just can't get the below code to be invoked in CakePHP 3.7. I have changed the needed language on my browser to French, but it does not work, and I only get the English version. Yes, I do have all the proper .po files in place.
public function middleware($middlewareQueue)
{
$middlewareQueue
// Add middleware and set the valid locales
->add(new LocaleSelectorMiddleware(['fr_FR']));
return $middlewareQueue;
}