nachtigall
nachtigall

Reputation: 2497

Set Map Language with Bing Maps JavaScript V8 API

In Bing Maps V7 there was an mkt param to set the language of the map. This is gone in V8 and instead the browsers default language is used:

The Bing Maps v8 web control no longer requires the use of a mkt parameter to localize the map. If one is not provided the map will automatically attempt to set the language of the map based on the user’s browser settings and/or location.

But we need to set the language according to the website's user setting (which can be different from the browser language). Is there a way to set this using the Bing Maps V8 JavaScript API?

Upvotes: 2

Views: 2237

Answers (1)

Swap
Swap

Reputation: 349

In Bing v8 we can use setLang and setMkt parameters to override the default localization setting.

please find below example for setting localization parameters:

<script type='text/javascript' 
src='http://www.bing.com/api/maps/mapcontrol?callback=GetMap&setMkt=en-IN&setLang=en' 
async defer>
</script>

Please find the below link from where I found this information : https://msdn.microsoft.com/en-us/library/mt712553.aspx#Localizing the Map

Upvotes: 2

Related Questions