Translation of Exceptions
- Member | 1
has anyone a solution for translate the thrown exeptions from Nette without changing the main classes.
For examle the SimpleAuthenticator Class is throwing a
AuthenticationException(‘Invalid password.’, self::INVALID_CREDENTIAL);
AuthenticationException(“User ‘$username’ not found.”, self::IDENTITY_NOT_FOUND);
I use Kdyby/Translation, but i find no solution für translate this Exception text to german with this extension.
- David Matějka
- Moderator | 6443
you should not translate exceptions. instead, you should create end-user message based on exception type and its code.