Reputation: 692
I need to translate the attribute values for the form validations. So I have duplicated the English validation errors and translated them to Farsi. Everything works but the attribute values are still in English. I thought I need to put the translation of attributes in the attributes array in the validation file as follows, but it's not working.
'attributes' => [
'username '=>'نام کاربری'
],
How can I translate them?
Upvotes: 1
Views: 1184
Reputation: 5839
You have a space after username before the quote so the attribute key is different. Remove the space so that it is the same.
Upvotes: 2