-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Validation errors in frontend are not shown in the locale of the current site #2387
Comments
Please share:
|
Sites.php
|
Small correction: the validation errors are shown in het locale as set in config/app.php |
Not sure about this yet, but it seems the Dutch translations are out of date. Maybe this is why you don't see the correct error language. Related or not, I'll see if I can update those a.s.a.p. |
It's not that, Rob |
Good to know. I hope this issue can get bumped up then. |
I can confirm this issue and just set up a demo project for core team to check this out. There's a contact form on the homepage. The homepage is in Dutch and if you send the form without any values you'll get back English error messages. |
Is there any workaround known for this? |
Fixed for next release. Make sure that you have the appropriate validation translation file in your For example, here's the French one: https://github.com/Laravel-Lang/lang/blob/master/src/fr/validation.php |
Thanks Jason |
Can anyone explain to me how it localised field validation should work? It kinda confuses me. With the current Dutch validation.php in the repo I get a 'This field is required', but then nicely in Dutch. Fine by me, but not how it should be I guess. If I replace the Dutch validation.php file with the one from the repo Jason mentioned, I get a 'ENGLISH FIELD NAME is verplicht' (part english, part dutch). It's nothing major but I'd like to understand :-) |
Check the /nl/validation.php file |
Bug Description
Validation errors in frontend are not shown in the locale of the current site
How to Reproduce
Create a multisite (sites.php)
Create a form with validation on the fields
Switch from one site to the other
Validation errors are only shown in "en" locale.
Extra Detail
Site in Dutch, validation errors in English
Environment
Statamic version: 3.0.{?}
PHP version: 7.{?}
Install method (choose one):
statamic/statamic
The text was updated successfully, but these errors were encountered: