Skip to content

Commit

Permalink
Allow to configure faker locale (#837)
Browse files Browse the repository at this point in the history
Closes #835
  • Loading branch information
theofidry authored Nov 17, 2017
1 parent c7eaf6f commit 620386d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Loader/NativeLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ class NativeLoader implements FilesLoaderInterface, FileLoaderInterface, DataLoa
{
use IsAServiceTrait;

/** @protected */
const LOCALE = 'en_US';

private $previous = '';

/**
Expand Down Expand Up @@ -563,7 +566,7 @@ protected function getBlacklistedFunctions(): array

protected function createFakerGenerator(): FakerGenerator
{
$generator = FakerGeneratorFactory::create();
$generator = FakerGeneratorFactory::create(self::LOCALE);
$generator->addProvider(new AliceProvider());
$generator->seed($this->getSeed());

Expand Down

0 comments on commit 620386d

Please sign in to comment.