rebelliard
rebelliard

Reputation: 9611

Manually set Google Maps directions language

I am currently using the GMaps.JS, which displays directions based on the user's browser preference. Since I live in Latin America, where computers are usually setup in English, I was wondering if there is a way for me to forcibly make the Maps API use Spanish.

Upvotes: 1

Views: 3520

Answers (1)

yodog
yodog

Reputation: 6232

I was wondering if there is a way for me to forcibly make the Maps API use Spanish.

Yes.

If you wish to change the Maps API to ignore the browser's language setting and force it to display information in a particular language, you can add an optional language parameter to the tag when including the Maps API javascript code, specifying the language to use.

For example, to display a Maps API application in Japanese, add &language=ja to the tag as shown below:

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

Source: https://developers.google.com/maps/documentation/javascript/basics

Upvotes: 1

Related Questions