【发布时间】:2012-01-14 22:34:57
【问题描述】:
例如,我需要以另一种语言显示“凭据错误”消息。
到目前为止,我发现它在\vendor\symfony\src\Symfony\Component\Security\Core\Authentication\Provider\UserAuthenticationProvider.phpauthenticate function asthrow new BadCredentialsException('Bad credentials', 0, $notFound);
我想知道用另一种语言显示此消息的推荐方式是什么。只是在这个地方更改字符串似乎不是最佳选择...... 还有其他可能在身份验证期间显示的消息。
我正在使用JMSSecurityExtraBundle 和FOSUserBundle,我想可能有一些内置功能可以处理这个...?
【问题讨论】:
标签: authentication internationalization symfony