I want to set the language in which the results of Google Places API will be presented. I want the result I could get using this url:
https://maps.googleapis.com/maps/api/place/details/json?placeid=A_PLACE_ID&key=MY_EY&language=el
In android I get place details like this:
PendingResult<PlaceBuffer> placeResult = Places.GeoDataApi
.getPlaceById(mGoogleApiClient, placeID);
placeResult.setResultCallback(mUpdatePlaceDetailsCallback);
I cannot find a way to set language for the results like above with "language=el".
The autocomplete widget is a search dialog with built-in autocomplete functionality. As a user enters search terms, the widget presents a list of predicted places to choose from. When the user makes a selection, a Place instance is returned, which your app can then use to get details about the selected place.
If you're building a client-side application, take a look at the Places SDK for Android, the Places SDK for iOS, and the Places Library, Maps JavaScript API. The Place Autocomplete service is a web service that returns place predictions in response to an HTTP request.
Go to the Google Cloud Console. Click the Select a project button, then select the same project you set up for the Maps JavaScript API and click Open. From the list of APIs on the Dashboard, look for Places API. If you see the API in the list, you're all set.
Unfortunately we can't set language on the Places API for Android. The best way to go with this is to call the Places Details API. The resource has an optional language
parameter to indicate the language of the response.
More information are shown here for the list of supported languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With