问题
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".
回答1:
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.
来源:https://stackoverflow.com/questions/34321356/how-to-set-language-for-google-place-details-result-in-android