• Resolved Parrotmaster

    (@parrotmaster)


    Hi,

    I’ve been trying to change the language of the directions but I can’t get it to work.
    They appear in English now but I need them in Dutch.
    I tried changing the url “maps.google.com” to “maps.google.nl” or “maps.google.com?language=nl-nl” but I can’t get it to work.

    Any help would be greatly appreciated.

    https://wordpress.org/plugins/get-directions/

Viewing 5 replies - 1 through 5 (of 5 total)
  • You will need to change the script in js/script.js

    line 37/8 is

    /*Add options.*/
    {ribbonOptions:{draggable:true,draggablepoi:true}},

    needs to become

    /*Add options.*/
    {ribbonOptions:{draggable:true,draggablepoi:true},locale: 'nl_NL'},

    but you may like the units to be in km so use

    /*Add options.*/
    {ribbonOptions:{draggable:true,draggablepoi:true},locale: 'nl_NL', unit: 'k'},

    and line 112 needs the non html text to be translated

    html += '<tr><th class="direction">Direction</th><th class="route">Route</th><th class="distance">Miles</th></tr></thead><tbody>';

    That should do the trick.

    One day I might get round to adding language and unit options, but as I have to focus on work that pays the rent, that is on the back burner right now.

    (the Google maps url call in the get-directions.php is just used for mobiles, and not teh website directions, which is provided by mapquest, but should pick up your local mobile device language preferences when it come into play )

    i have change to /*Add options.*/
    {ribbonOptions:{draggable:true,draggablepoi:true},locale: ‘es_Es’, unit: ‘k’},

    but still in english! what can i do to get in Spanish?
    Thanks

    Hi,

    it might be you need es_ES i.e. uppercase ES

    as in

    es_ES – Spanish
    es_XL – Spanish (Latino)

    see this link for MapQuest supported locales

    http://developer.mapquest.com/web/products/open/forums/-/message_boards/view_message/390942

    I haven’t tried it but it is worth a go

    hey! i find it:

    /*Add options.*/
    {ribbonOptions:{draggable:true}, routeOptions:{locale:’es_ES’}},

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Change language of directions’ is closed to new replies.