skip to Main Content

I have the laravel 10 app, use breeze. I am looking for a way to localize the login and register validation error messages. In general, the localization works, I have the locale configured. (it seems to me, this has nothing to do with breeze, but I mention that too, just in case)

I have the lang/{myLocaleCode}/validation.php file translated. But I can not find the messages like "Please fill out this field" amongst the keyValue pairs. Neither in lang/en/validation.php version. Neither I do not find the instructions in documentation. I also tried to grep the strings from the whole application folder but nothing was found, which is quite weird too.

2

Answers


  1. You can find some error messages in lang/{locale}/auth.php.

    Example

    'failed' => 'These credentials do not match our records.',
    'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
    

    This means that you can access with this keys auth.failed and auth.throttle

    Login or Signup to reply.
  2. You can use this package Laravel lang with commons messages translated

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search