• Resolved pruto

    (@pruto)


    Is there a way to set the gesture handling options?
    Looking to set a different language for the warning message as per the example here: https://github.com/Raruto/leaflet-gesture-handling/blob/master/examples/leaflet-gesture-handling.html
    Locale is one of the options what can be set:
    gestureHandlingOptions: { // OPTIONAL
    // text: {
    // touch: “Hey bro, use two fingers to move the map”,
    // scroll: “Hey bro, use ctrl + scroll to zoom the map”,
    // scrollMac: “Hey bro, use \u2318 + scroll to zoom the map”
    // },
    // locale: ‘en’, // set language of the warning message.
    // duration: 5000 // set time in ms before the message should disappear.
    }

    You help is much appreciated

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author hupe13

    (@hupe13)

    The language is the one the visitor of your site has set in his browser. This works, I just tested it with german, english, french. Or what do you mean?

    Thread Starter pruto

    (@pruto)

    OK, I meant ro recognize the language of the wordpress site, not the browser.
    If your website language is in English will show the two fingers message in English, if in German will be in German regardless of the browser.
    I thought that option in the gestureHandlingOptions was for that purpose.
    locale: ‘en’, // set language of the warning message.
    Thanks,

    Thread Starter pruto

    (@pruto)

    I manually modified this wp-content/plugins/extensions-leaflet-map/leaflet-plugins/leaflet-gesture-handling-1.3.5/js/leaflet-gesture-handling-leafext.min.js
    only inconvenience is when the plugin updates that file in any future plugin update
    thanks,

    Plugin Author hupe13

    (@hupe13)

    ok, I’ll see what I can do. I’ll put it on the wishlist.

    Plugin Author hupe13

    (@hupe13)

    You can test it. See the settings in /wp-admin/admin.php?page=extensions-leaflet-map-github&tab=gesture

    • This reply was modified 3 years, 3 months ago by hupe13.
    Plugin Author hupe13

    (@hupe13)

    Now in version 2.2.2

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Set Language locale for gesture handling’ is closed to new replies.