I need to display, for example, the message "Bad credentials" in another language. So far, I have found that it is selected as an exception in
\vendor\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.php
authenticate as a function throw new BadCredentialsException('Bad credentials', 0, $notFound);
I am wondering what would be the recommended way to display this message in another language. Just changing the line at this point seems not optimal ... There are also other messages that may be shown during authentication.
I use JMSSecurityExtraBundle and FOSUserBundle , and I assume there may be some built-in functions to handle this ...?
authentication internationalization symfony
Priednis
source share