I am currently using Laravel Excel to import data from an excel file into database. When there are some errors occur, I'd like it to report in a foreign language rather than in English which I know I have to use customValidationMessages() function to define the output messages.
This is an example of regular messages:
There was an error on row 2. The somefield has already been taken.
There was an error on row 3. The somefield has already been taken.
Which consists of 2 parts
There was an error on row {some_row}. is the first part.
and
The somefield has already been taken. is the last part
and when I follow the document provided here https://docs.laravel-excel.com/3.1/imports/validation.html#custom-validation-messages all I can output in the foreign language is just the last part but the first part remains in English like this.
There was an error on row 2. ข้อความในภาษาต่างประเทศ
There was an error on row 3. ข้อความในภาษาต่างประเทศ
But I want it to be like this
ข้อความภาษาต่างประเทศแถวที่ 2. ข้อความในภาษาต่างประเทศ
ข้อความภาษาต่างประเทศแถวที่ 3. ข้อความในภาษาต่างประเทศ
How can I do it???
Thank you all in advance