-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Language for errors message #623
Comments
@FuriosoJack You are welcome to open a PR that implements this. Note it's a low priority though. |
I don't think there's anything stopping you from doing this already. Each error payload has a meaningful identifier that you can use to map to your own localized strings. Something like this: foreach( $validator->getErrors() as $error ) {
$msgId = "msg_json_schema_error_{$error['constraint']";
// insert your favorite localization technology here
echo $i18n->loc($msgId, $error['params'];
} |
@FuriosoJack in an attempt to cleanup this repo we are trying to filter the issues and see which ones might be closed. Is it safe to assume this is a rather old issue, which sadly was left unanswered, and can be closed? Feel free to close it yourself with some comments if helpful. |
It would be awesome to be able to set a message translation file or the ConstraintError class can be overwritten to change the messages
The text was updated successfully, but these errors were encountered: