How to set language for Google Place Details result in android?

走远了吗. 提交于 2019-12-02 00:32:37

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!