joke2k/faker — pull request #122 by mdxs (2014-07-02 10:17:17+00:00)
Title: Simplified getting __lang__ from provider

Looking into how `python -m faker > docs.txt` works to generate documentation, noticed that the approach to determine the `__lang__` of a provider was a bit strange. Therefore this simplification to help maintenance...

Background: the following works interactively:

```
>>> from faker import Faker
>>> fake = Faker('nl_NL')
>>> for p in fake.get_providers():
... print p.__lang__, '\t', p.__provider__
...
None	user_agent
nl_NL	ssn
nl_NL	phone_number
None	python
None	profile
nl_NL	person
None	misc
None	lorem
None	job
None	internet
None	file
None	date_time
None	credit_card
en_US	company
None	color
nl_NL	address
None	base
>>>
```

Note also how the `company` provider is "en_US" (the default) as that hasn't been localized (yet) for "nl_NL".