wellyshen / use-places-autocomplete

😎 📍 React hook for Google Maps Places Autocomplete.
https://use-places-autocomplete.netlify.app
MIT License
1.26k stars 65 forks source link

Is there any way to change the language of the results? #973

Closed ifmael closed 2 years ago

ifmael commented 2 years ago

I would like to get the results in Spanish but i don't find the way to do it with this hook and i don't know if it could be possible

wangela commented 2 years ago

You can set the language as a parameter of the script loading URL. https://developers.google.com/maps/documentation/javascript/url-params

To set to Spanish, you would use &language="es" for Spanish or &language="es-419" for Spanish (Latin America), as documented in the supported languages