Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

HERE Maps API - getting and setting the default language in application context

From Wiki
Jump to: navigation, search

This articles shows how to get and set the default language in application context.

Article Metadata
Code Example
Source file: [map-language.html]
Tested with
Devices(s): Internet Explorer, Google Chrome, Firefox, Opera
Platform(s): Web browsers
Dependencies: HERE Maps 2.5.3
Keywords: HERE Maps, JavaScript, default language
Created: Maveric (25 Oct 2011)
Last edited: jasfox (28 Nov 2013)


HERE Maps API supported web browser (basically any modern web browser)

Important note about maps credentials

Nokia provides several services options within the Maps API offering. The service is free to use, but you must obtain and use authentication and authorization credentials to use the services. Please read the Terms and Conditions and check the Pricing Plans page to decide which business model best fits your needs. Authentication requires unique Maps API credentials, namely an AppId and a token. You can get these credentials free for free following the instructions here


The following code displays and alters the map language. Note that the language must be set prior to instantiating the map.

function setMapLanguage(){
var availableLanguages = ["en-US", "en-GB", "de-DE", "es-ES",
"fr-FR", "it-IT", "ru-RU", "zh-CN"] ,
randomLanguageIndex = Math.floor(Math.random() * availableLanguages.length),
randomLanguage = availableLanguages[randomLanguageIndex];
$("#initialLangauge").text("The Initial Default Language is " +
nokia.Settings.set("defaultLanguage", randomLanguage);
$("#currentLanguage").text("Now the Default Language is " +
map = new'mapContainer'), {
center: [53.1, 13.1],
zoomLevel: 4,
components: [

The following fully working example can be found at:

This page was last modified on 28 November 2013, at 11:57.
129 page views in the last 30 days.