{"action":"created","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/10490","labels_url":"https://api.github.com/repos/laravel/framework/issues/10490/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/10490/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/10490/events","html_url":"https://github.com/laravel/framework/pull/10490","id":109807908,"number":10490,"title":"Adds the ability to select which language faker will generate the data","user":{"login":"rleger","id":3156035,"avatar_url":"https://avatars.githubusercontent.com/u/3156035?v=3","gravatar_id":"","url":"https://api.github.com/users/rleger","html_url":"https://github.com/rleger","followers_url":"https://api.github.com/users/rleger/followers","following_url":"https://api.github.com/users/rleger/following{/other_user}","gists_url":"https://api.github.com/users/rleger/gists{/gist_id}","starred_url":"https://api.github.com/users/rleger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleger/subscriptions","organizations_url":"https://api.github.com/users/rleger/orgs","repos_url":"https://api.github.com/users/rleger/repos","events_url":"https://api.github.com/users/rleger/events{/privacy}","received_events_url":"https://api.github.com/users/rleger/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-05T14:26:47Z","updated_at":"2015-10-05T18:48:20Z","closed_at":"2015-10-05T18:41:07Z","pull_request":{"url":"https://api.github.com/repos/laravel/framework/pulls/10490","html_url":"https://github.com/laravel/framework/pull/10490","diff_url":"https://github.com/laravel/framework/pull/10490.diff","patch_url":"https://github.com/laravel/framework/pull/10490.patch"},"body":"It would be nice to be able to select which language Faker will generate the factory data from.\r\n\r\nI thought of using the app.locale var but what if the language is not available in faker... might be cleaner to differentiate the two.\r\n\r\nSo instead I thought you could add a dedicated config option in the database file for instance. That way you can swap it easily.\r\n\r\nSorry if this is not very clean, just trying to contribute in my own little way with a solution to something that's bothering me.\r\n\r\nThank you.\r\n\r\nconfig/database.php\r\n```\r\n    /*\r\n    |--------------------------------------------------------------------------\r\n    | Faker locale\r\n    |--------------------------------------------------------------------------\r\n    |\r\n    | Language in which faker will generate dummy data\r\n    |\r\n    */\r\n\r\n    'faker_locale' => 'fr_FR', \r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/laravel/framework/issues/comments/145629270","html_url":"https://github.com/laravel/framework/pull/10490#issuecomment-145629270","issue_url":"https://api.github.com/repos/laravel/framework/issues/10490","id":145629270,"user":{"login":"rleger","id":3156035,"avatar_url":"https://avatars.githubusercontent.com/u/3156035?v=3","gravatar_id":"","url":"https://api.github.com/users/rleger","html_url":"https://github.com/rleger","followers_url":"https://api.github.com/users/rleger/followers","following_url":"https://api.github.com/users/rleger/following{/other_user}","gists_url":"https://api.github.com/users/rleger/gists{/gist_id}","starred_url":"https://api.github.com/users/rleger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rleger/subscriptions","organizations_url":"https://api.github.com/users/rleger/orgs","repos_url":"https://api.github.com/users/rleger/repos","events_url":"https://api.github.com/users/rleger/events{/privacy}","received_events_url":"https://api.github.com/users/rleger/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T18:48:20Z","updated_at":"2015-10-05T18:48:20Z","body":"ok, how about a \"service\" that would try to initialize faker with the language set in app.locale and default to en_US ? Right now I'm overriding the binding in my own AppServiceProvider which is fine but a bit hacky. "}}