Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change toolbar button title? #66

Open
dentroboy opened this issue Jul 31, 2019 · 4 comments
Open

How to change toolbar button title? #66

dentroboy opened this issue Jul 31, 2019 · 4 comments

Comments

@dentroboy
Copy link

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!

@eliedrian
Copy link

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.

@t1gor
Copy link

t1gor commented Sep 8, 2020

This is not actually true: https://github.com/Leaflet/Leaflet.draw/blob/master/src/Leaflet.draw.js#L63

@rodri595
Copy link

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."

@Ortimis
Copy link

Ortimis commented Feb 28, 2023

It would be great to have a locale prop with standard texts in multiple languages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants