For anyone interested in multiple language support, I started a localization plugin to work with Leaflet.draw by simply expanding on the L.drawLocal (which was the prefered method describe in your README).
var L = require('leaflet')
var drawLocales = require('leaflet-draw-locales')
// Automatically defines Leaflet.draw to the specified language
drawLocales('fr')
// Customize locale language
var locale = drawLocales('fr')
locale.draw.toolbar.buttons.polygon = 'Awesome polygon!'
L.drawLocal = locale
Currently there's only 2 languages supported (English & French), if anyone would like to contribute to adding more languages (I would very much appreciate it 🤗 !) or if we can figure out a way to port over locales to be directly built-in Leaflet.draw.
For anyone interested in multiple language support, I started a localization plugin to work with
Leaflet.draw
by simply expanding on theL.drawLocal
(which was the prefered method describe in your README).https://github.com/DenisCarriere/Leaflet.draw.locales
Pretty straightforward and easy to use:
Currently there's only 2 languages supported (English & French), if anyone would like to contribute to adding more languages (I would very much appreciate it 🤗 !) or if we can figure out a way to port over
locales
to be directly built-in Leaflet.draw.