B
B
BonBon Slick2018-05-03 15:47:33
Exceptions
BonBon Slick, 2018-05-03 15:47:33

Internationalize Exceptions, or will it do?

Sometimes, exception messages are displayed to the end user. And you have to intercept the exception and still translate its message.
Is it right? Can you translate right now? Or add validation rules with translations? What if a package like beberlei/assert spits only actions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2018-05-03
@BonBonSlick

As a result, the response for the user = 503
+ possibly a hash from the error id, like Google, for example
Localization is best done through php.net/manual/en/function.gettext.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question