Skip to content

Issue 2014 - Multilingual Mapping Use #2160

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hkfrese
Copy link

@hkfrese hkfrese commented Jun 11, 2025

Issue:
People wanted to make the same map twice - once with English numbers (like 1,234.56) and once with French (or really any other country outside of the US styling) numbers (like 1 234,56). But Folium was stuck using whatever language the computer was set to.
Proposed Solution:
I created a helper tool that can change how numbers look in map legends without changing the computer's language settings.
How It Works:

Make the map normally
Add code - it waits for the map to finish loading
Find all the numbers - in the legend/scale on the side
Change the format - swap periods for commas, spaces for commas, etc.
Save different versions - now you can make an English version AND a "foreign" version

Additional Info:

You don't need to restart your computer or change system settings, and while the default was French (because that's my second language anyways), you can make as many language versions as you want. Other people can easily add new languages by just adding the number rules. It should work with any map data you already have

@hkfrese
Copy link
Author

hkfrese commented Jun 11, 2025

I forgot! Link to original issue:

#2014

@hansthen
Copy link
Collaborator

Thanks for this PR! I had a quick look.

There are some issues in the pre-commit hook, though. Probably that means you missed a step in setting up your local environment. Please have a look here: https://github.com/python-visualization/folium/blob/main/.github/CONTRIBUTING.md.

@hansthen
Copy link
Collaborator

Also, the geoman documentation file seems to be empty.

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

Successfully merging this pull request may close these issues.

2 participants