How to change toolbar button title?
Hey,
is there any way to change the titles of the buttons in the draw and edit toolbar? For example I want to change 'Draw a polyline'.
Thanks!
There doesn't seem to be a way to do this even with leaflet-draw, or leaflet itself. Changes need to be done over there for this to be possible.
This is not actually true: https://github.com/Leaflet/Leaflet.draw/blob/master/src/Leaflet.draw.js#L63
yeah you can, this is a simple way i did
L.drawLocal.draw.toolbar.buttons.polyline="Polyline name" L.drawLocal.draw.toolbar.buttons.marker="Marker New Name"
L.drawLocal.draw.toolbar.actions.title="Cancelar dibujo" L.drawLocal.draw.toolbar.actions.text="Cancelar "
L.drawLocal.draw.toolbar.finish.title="Terminar de dibujar" L.drawLocal.draw.toolbar.finish.text="Terminar"
L.drawLocal.draw.toolbar.undo.title="Eliminar el último punto dibujado" L.drawLocal.draw.toolbar.undo.text="Eliminar el último punto"
//tooltip L.drawLocal.draw.handlers.polyline.tooltip.start="Haga clic para comenzar a dibujar la línea." L.drawLocal.draw.handlers.polyline.tooltip.cont="Haga clic para continuar dibujando la línea." L.drawLocal.draw.handlers.polyline.tooltip.end="Haga clic en el último punto para terminar la línea."
L.drawLocal.draw.handlers.marker.tooltip.start="haga clic para Colocar el Marcador."
It would be great to have a locale prop with standard texts in multiple languages