Export (0) Print
Expand All
11 out of 13 rated this helpful - Rate this topic

Localizing the Map

Bing

The Bing Maps AJAX Control 7.0 provides the ability to return a localized map and route directions.

Setting the Language

By default, the map labels, navigation control text and directions are provided in the United States English (en-US). You can localize the map for other languages by setting the mkt parameter in the map control reference. For example, the following map control reference sets the mkt parameter to the culture fr-fr.

<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=fr-fr"></script>

The culture code fr-fr stands for French-France and specifies that the version of French spoken in France be used as the language for the map. For more language options, see the Supported Cultures table below.

[Feature preview] Show map labels in two languages on the same map

Gg427600.Important(en-us,MSDN.10).gifImportant:
The following preliminary documentation is for a feature that displays two languages on a map. This feature is released as a preview and is subject to change. You cannot use this feature in Windows Store apps.

You can display map labels in two languages when you specify a primary language and a secondary language in the map control reference.

<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=primary,secondary"></script>

When you specify a primary and a secondary language and both languages are supported for map labels, then localized map labels are displayed for both languages when they are available. The primary language is used for map labels, the navigation control and directions when supported.

The following example displays both Russian-Russia (ru-ru) and English-United States (en-US) map labels, and will provide navigation control text and directions using Russian (ru-ru).

<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=ru-ru,en-us"></script>

The following screenshots show how the map labels will appear for this example.

Map showing russian and english labels


Map showing russian and english

[Feature Preview] Display map labels in the local language using the ‘ngt’ option

Gg427600.Important(en-us,MSDN.10).gifImportant:
The following preliminary documentation is for a feature that shows map labels in the local language. This feature is released as a preview and is subject to change. You cannot use this feature in Windows Store apps.

You can display map labels in the local language of each country or region on the map by specifying the custom value ngt as the language value. “Ngt” stands for “neutral ground truth”. When you specify this value, you can view map labels that you would see “on the ground”. For example, if you want to display the navigation control text in Russian-Russia and show map labels in both French and Russian when viewing a map of France, set the mkt parameter to mkt=ru-ru,ngt. Note that the ngt option does not apply to directions or to the navigation control.

<script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&mkt=ru-ru,ngt"></script>

The following screenshot shows how the map labels will appear for this example.

Map showing russian and local language labels

Examples

Gg427600.Important(en-us,MSDN.10).gifImportant:
Examples that show more than one language or that use the 'ngt' parameter are examples of preview features. Preview features are subject to change.

The following examples show how various mkt settings affect the localization of the map.

mkt parameter Navigation Control Map Labels Directions

default (mkt not specified)

en-US

en-US

en-US

mkt=ngt

en-US

local language

en-US

mkt=fr-FR

fr-FR

fr-FR

fr-FR

mkt=fr-FR,ngt

fr-FR

fr-FR, local language

fr-FR

mkt=ngt,fr-FR

Note that fr-FR is used for the navigation control and directions because ngt only applies to map labels.

fr-FR

local language, fr-FR

fr-FR

mkt=es-ES,fr-FR

es-ES

es-ES,fr-FR

es-ES

Supported Cultures

The following table lists supported cultures for map labels, the navigation control and the Microsoft.Maps.Directions module. The Culture column lists values to specify for the mkt parameter.

Language - Country/Region Culture Map Labels Navigation Control Microsoft.Maps.Directions module

All

ngt

X

Czech – Czech Republic

cs-CZ

X

X

Danish – Denmark

da-DK

X

X

Dutch - Belgium

nl-BE

X

X

Dutch – Netherlands

nl-NL

X

X

X

English - Australia

en-AU

X

X

English – Canada

en-CA

X

X

X

English - India

en-IN

X

X

X

English - United Kingdom

en-GB

X

X

X

English - United States

en-US

X

X

X

Finnish – Finland

fi-FI

X

X

French-Belgium

fr-BE

X

X

French – Canada

fr-CA

X

X

X

French-Switzerland

fr-CH

X

X

French – France

fr-FR

X

X

X

German – Germany

de-DE

X

X

X

Italian – Italy

it-IT

X

X

X

Japanese - Japan

ja-JP

X

X

X

Korean-Korea

Ko-KR

X

X

Norwegian (Bokmal) - Norway

nb-NO

X

X

X

Polish - Poland

pl-PL

X

X

X

Portuguese - Brazil

pt-BR

X

X

Portuguese - Portugal

pt-PT

X

X

Russian - Russia

ru-RU

X

X

X

Spanish - Mexico

es-MX

X

X

X

Spanish - Spain

es-ES

X

X

X

Spanish – United States

es-US

X

X

X

Swedish - Sweden

sv-SE

X

X

X

Chinese – Hong Kong

zh - HK

X

X

X

Chinese - Taiwan

zh - TW

X

X

X

Localization of Error Messages

  • Error messages are always displayed in English - United States.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.