Google.maps.places.

I use google.maps.places.Autocomplete object and always get results in Ukrainian.

I load such a library

http://maps.google.com/maps/api/js?sensor=true&libraries=places&language=en-US

how to transfer parameters to autocomplete language?

var autocomplete = new google.maps.places.Autocomplete($("#google_places_ac")[0], {}); google.maps.event.addListener(autocomplete, 'place_changed', function() { var place = autocomplete.getPlace(); $scope.location = place.formatted_address; // at that point $scope.location is in ukrainen, but I want Russian $scope.$apply(); }); 

I added an image explaining the problem. The text that is squared with RED is in Russian, the text with Green is in Ukraine. As you can see, on one map there are two different languages. Also introduced with Russian and formatted language with Ukrainian. I believe this is a Google map.s error

enter image description here

+10
javascript autocomplete google-maps google-maps-api-3
source share
2 answers

According to the docs

"The API detects the user's browser settings and sets the language accordingly. The API can override the language."

This means that the input will change according to the user's language in the browser.

try the script tag.

 <script src="http://maps.googleapis.com/maps/api/js?libraries=places&sensor=false&language=yourLanguage"></script> 

take a look at this list of languages

Edit:

Try setting this parameter in the language

 language=ru-RU 
+22
source share

Have you tried language = ru instead of language = ru-RU? This works for me. For example, you can enter the address in Autocomplete in any supported language, but autocomplete.getPlace () will return the result to the language from the parameter and if only the Russian language ru works.

See also the language table: https://developers.google.com/maps/faq#languagesupport

No ru-RU, only ru.

+3
source share

All Articles