Skip to content
Advertisement

Laravel :value in another language

Laravel 8 php 7.1

I have a form with some input fields. The form is available in English and German.
If you don’t enter something in the German version and want to send it, the following text appears:

Dieses Feld wird benötigt wenn job description nicht vorhanden ist.

(In English that means This field is required if the job description is not available. )

How can I replace the job description (:values) with a German word.

Here is my resources/lang/de/validation.php file:

'required_without'     => 'Dieses Feld wird benötigt wenn :values nicht vorhanden ist.',

Advertisement

Answer

Try this: in your /de folder

 'values' => [
    'job_description' => 'Job Beschreibung'
    ],
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement