1

I have an ionic app. I can the goggle maps api in the index.html using

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=key&amp;sensor=true&amp;language=en&amp;libraries=places"></script>

However my app has 2 languages which I translate using angular translate.

When the app is translated, the map and the geocoder doesn't change language. So I tried to add another

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=key&amp;sensor=true&amp;language=ch&amp;libraries=places"></script>

in index.html

But seems like it only takes one. How can I solve this?

1 Answer 1

2

AFAIK the Geocoder uses the browser's preferred language, or language specified when loading the API (see https://developers.google.com/maps/documentation/javascript/basics?csw=1#Localization).

I don't think you can load two times the API with two different languages specified. Instead you can try to load the API only when your local language is set (only one at a time).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.