show validation errors in arabic language in laravel

928 0 0 0

Last Updated : 2024-05-01 13:12:03

how to show validation errors in arabic language in laravel

1- You should modify language reference in folder config->app as follows


'locale' => 'en',  // modify en to ar
'fallback_locale' => 'en' , // modify en to ar

2- now its time to modify this file resources->lang->en->validation as follows (you can copy en folder and paste it again with a new name such as 'ar' or just modify validation file as follows)


<?php

return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/

'accepted' => '?

Mahmoud Anwar

Mahmoud Anwar

Back End Developer with a passion for developing innovative web applications that expedite the efficiency and effectiveness of organizational success. Well-versed in technology and writing code to create systems that are reliable and user-friendly. Also has the proven ability to motivate, educate, and collaborate effectively to build web applications and effectively track changes. Confident communicator, strategic thinker, and innovative creator to develop software that is customized to meet a company’s organizational needs, highlight their core competencies, and further their success.