1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-19 06:49:50 +01:00

we need help for localization

This commit is contained in:
Francois Zaninotto 2011-10-17 14:47:11 +02:00
parent d971e45ad7
commit 47112d2edc

View File

@ -148,9 +148,23 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle
```php
<?php
$faker = Faker\Factory::create('fr_FR'); // create a French faker
echo $faker->name; // 'Jean Dupont'
for ($i=0; $i < 10; $i++) {
echo $faker->name, "\n";
}
// Luce du Coulon
// Auguste Dupont
// Roger Le Voisin
// Alexandre Lacroix
// Jacques Humbert-Roy
// Thérèse Guillet-Andre
// Gilles Gros-Bodin
// Amélie Pires
// Marcel Laporte
// Geneviève Marchal
```
The localization of Faker is an ongoing process, for which we need your help. Don't hesitate to create localized providers to your own locale and submit a PR!
## Seeding the Generator
You may want to get always the same generated data - for instance when using Faker for unit testing purposes. The generator offers a `seed()` method, which seeds the random number generator. Calling the same script twice with the same seed produces the same results.