3
votes

https://google-developers.appspot.com/maps/documentation/javascript/examples/places-autocomplete

I have a similar page with above google places demo. Notice that the location input field has a hint of "Enter a location". How do i change the language of this hint? And how do i change the language of the results return? I guess both of them goes to the same setting?

1

1 Answers

9
votes

As per the documentation:

"The API detects the browser settings of the user and set the language appropriately. It is possible to override the language in the APIs."

The input field placeholder will change automatically depending on the users browser agent language setting.

You can also override the automatic language detection by setting the language parameter in your bootstrap request to a supported language.

E.G.

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