nocksock
nocksock

Reputation: 5527

Setting language for DirectionsService in Google Maps API v3

I now switched to the v3 API of google maps and offer some route-planning using google's DirectionsService. It all works as expected, but the language is in english and i can't find a way to set it to german. The map itself is already in german – only the output of DirectionsService is in english.

Anyone an idea how to set it to de-DE?

Upvotes: 2

Views: 6651

Answers (2)

Galen
Galen

Reputation: 30170

Google maps will use the language specified in the user's browser in the Accept-Language header. You change this by doing what you found and adding the language to the url.

Upvotes: 2

nocksock
nocksock

Reputation: 5527

After a lot of googling i came along a blogpost on google geodevelopers that told me to simply put the language into the api-request request:

<script src="http://maps.google.com/maps/api/js?sensor=true&language=de"></script>

And it works!

Upvotes: 15

Related Questions