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

localization #166

Open
prancius opened this issue Oct 29, 2021 · 3 comments
Open

localization #166

prancius opened this issue Oct 29, 2021 · 3 comments

Comments

@prancius
Copy link

I see languages folder. Any information how to change language.
localization attribute in options not working.

Regards,
Pranas

@russorl
Copy link

russorl commented Jun 27, 2022

Set localization option:

var measureControl = new L.Control.Measure({
position: 'topleft',
primaryLengthUnit: 'meters',
secondaryLengthUnit: 'kilometers',
primaryAreaUnit: 'sqmeters',
secondaryAreaUnit: 'hectares',
captureZIndex: 10000,
localization: 'es'
});

@karasma3
Copy link

karasma3 commented Jul 20, 2022

localization attribute inside options is not working as @prancius is saying... is there any other way to set the language?
@russorl i tried your code but it just is not working for me
EDIT: i found out that i am using React and i am importing the library as import 'leaflet-measure/dist/leaflet-measure' so if i import different localized javascript file i will have the localized version
Is there any other way to import the library to the react without importing localized version?

@MarceloDiazz
Copy link

MarceloDiazz commented Apr 24, 2023

Hello, I currently have the same problem, the localization option does not work on my website, I import "leaflet-measure/dist/leaflet-measure.js" and it brings me the English language.

I need to do a validation depending on the language of the browser so that it comes translated

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

4 participants