Renaming tooltip "Delete selected" in Vis-Timeline

109 Views Asked by At

I am trying to rename the Vis-Timeline tooltip, that appears when the user hovers over the white "delete" icon, as shown in the screenshot below: "Delete selected".

enter image description here

I tried renaming it with plain JS, but the div only appears when the item is selected, so I don't know how to "grab" the div and rename the title, when it only appears when the item is selected.

<div class="vis-delete" title="Delete selected" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></div>

I've looked through the Vis-Timeline documentation, and I can't find anything about localization, where the "Delete selected" text appears.

1

There are 1 best solutions below

0
On BEST ANSWER

On the link you provided, if you click on Localization at the bottom of the screen, you will find an example of how to create a new locale :

var options = {
  locales: {
    // create a new locale (text strings should be replaced with localized strings)
    mylocale: {
      current: 'current',
      time: 'time',
      deleteSelected: 'Delete selected'
    }
  },

  // use the new locale
  locale: 'mylocale'
};