Change the language of Tiles and Traffic Incidents in HERE Maps API for JavaScript 3.1
Problem
=======
In order to change the display language of the map, along with the language for UI elements such as Choose View, Traffic Incidents in the HERE Maps API for JavaScript 3.1, you need to specify certain parameters.
Solution
========
When creating the map layers and UI components, pass the required language code. For the a list of the languages supported by the Map Tile API, see the documentation of the lg parameter in the Developer Guide. In the Maps API for JavaScript 3.1, you can pass this value directly while creating the layers as follows:<br />var defaultLayers = platform.createDefaultLayers({lg : 'de'});<br />
If the given language is not available, the default language en is used.
The languages supported for traffic incidents and other elements shown on the map such as Choose View are governed by the UI. For a list of the possible values, see the description of the locale parameter in the HERE Maps API for JavaScript 3.1 documentation. You can pass this value when creating the UI in JavaScript code as follows:<br />var ui = H.ui.UI.createDefault(map, defaultLayers,'de-DE');<br />
The result would be a map with tiles and UI elements in the required language.