-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[9.x] Translation of the default message of the validator #43837
[9.x] Translation of the default message of the validator #43837
Conversation
74b5122
to
68fabaa
Compare
68fabaa
to
6941ecf
Compare
Finally it was accepted. |
It's a cool thing, thanks! |
Tried this and none worked ( in validation.php translation file ): ' (and :count more errors)' => 'Test', |
@Pablo-Camara, you need to add this to For example, {
"(and :count more error)": "(et :count erreur en plus)",
"(and :count more errors)": "(et :count erreurs en plus)",
} You can also install a localization publisher for your project: publisher.laravel-lang.com |
For anyone else who like us uses PHP files rather than JSON files for translations.We used a Service Provider to inject language strings from
So our
|
@andrey-helldar that worked! My mistake trying to add in the validation.php , thanks for the help! |
…tor" (#46378) * [9.x] Update CHANGELOG.md * Update facade docblocks * [9.x] Update CHANGELOG.md * Revert "[9.x] Translation of the default message of the validator (#43837)" This reverts commit a833a88. --------- Co-authored-by: Tetiana Blindaruk <t.blindaruk@gmail.com> Co-authored-by: TBlindaruk <TBlindaruk@users.noreply.github.com>
Before:
After
On line 99, I deliberately put the space character outside the translation function, as it can be confusing for developers, namely, they can compose translations as
"(and :count more errors)"
instead of" (and :count more errors)"
and will not understand why the translation does not work.