Hi,
I am working with Directions widget within Arcgis api 3.38, and actually Im trying to change the directions language from English to Frensh language.
so I have tried to work with "setDirectionsLanguage(locale)",
https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#setdirectionslanguage
But Im not able to do it correctly... any help please it would be much appreciated.
many thanks
This worked for me, but with a caveat.
directions.setDirectionsLanguage("fr");
According to the doc, this doesn't change the localization of the widget itself, just the language of the directions results coming from the REST API.
Specify the language used for the directions. The supported languages can be requested from either the Route Service REST API, or from the widget itself
Hi many thanks for your response,
I have already used it but did not worked for me... directionsW.setDirectionsLanguage("fr");
Try in this sample.
https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic
Update the code like this.
directions.startup();
// after startup()
directions.setDirectionsLanguage("fr");
This worked for me. I think that method has to be called after the startup() method.
Hi, thanks for your help
I have did the same thing but still not working, But I think that the language should be installed first in the NAServer.
many thanks