Implemented automatical translation

This commit is contained in:
Kevin Frantz 2018-09-12 18:37:22 +02:00
parent a76884d63a
commit b8f6185554

View File

@ -22,8 +22,7 @@ class SecurityController extends AbstractController
{
$error = $authenticationUtils->getLastAuthenticationError();
if ($error) {
$this->addFlash('danger', $error->getMessage());
#$this->addFlash('info', $translator->trans('Code:%code%',['%code%'=>$error->getMessageKey()]));
$this->addFlash('danger', $translator->trans($error->getMessageKey(),$error->getMessageData(),'security'));
}else{
$lastUsername = $authenticationUtils->getLastUsername();
if($lastUsername){