DenisCarriere / geocoder

:earth_asia: Python Geocoder
http://geocoder.readthedocs.org
MIT License
1.63k stars 287 forks source link

"Accept-language" keyword #470

Open mdbaron42 opened 9 months ago

mdbaron42 commented 9 months ago

Thank you for the geocoder library. It is a great idea, and is working well for me, although I have only really used it on OSM, as essentially all the others require API keys now. Would it be possible to add the "Accept-language" keyword parameter to the OSM geocoder, please? I have tried setting it directly in the code, and it works, and greatly helped checking the returned results, as I was able to get the address in latin script by adding the line:

'accept-language': "en,de,*",

to the parameters passed in the function _build_params in the classes OsmQuery and OsmQueryDetail

Clearly, for general utility, it would be best if this was settable by the user on an ad hoc basis, rather than hard-coded.

Thanks again, Michael