From 620386df7c434bbc5c0d7ec492804ee615263bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FIDRY?= Date: Fri, 17 Nov 2017 01:27:48 +0000 Subject: [PATCH] Allow to configure faker locale (#837) Closes #835 --- src/Loader/NativeLoader.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Loader/NativeLoader.php b/src/Loader/NativeLoader.php index c098b2911..8c247194d 100644 --- a/src/Loader/NativeLoader.php +++ b/src/Loader/NativeLoader.php @@ -205,6 +205,9 @@ class NativeLoader implements FilesLoaderInterface, FileLoaderInterface, DataLoa { use IsAServiceTrait; + /** @protected */ + const LOCALE = 'en_US'; + private $previous = ''; /** @@ -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());