Yasen Sayed

6 Mar 2022

How can I use arabic words, paragraphs in the faker?


I'd like to add Arabic words, paragraphs in the dummy data faker generator in the Laravel project for example see below:

public function definition(): array
 return [
 'name_en' => $this->faker->unique()->name,
 'name_ar' => $this->faker->unique()->name, // It should be in Arabic
 'synonyms_en' => $this->faker->paragraph,
 'synonyms_ar' => $this->faker->paragraph,// It should be in Arabic

Please, anyone can help me to do this?



7 Mar 2022

Hello Yasen did you try to use 


$faker = Faker\Factory::create('ar_AA');

But Here you can find all the locales


You have to choose the local you need depending on the country as arabic is spoken in many places.

It should help, kind regards

© 2023 Copyrights reserved for