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

Localize labels into preferred language #8

Merged
merged 4 commits into from
Aug 15, 2024
Merged

Localize labels into preferred language #8

merged 4 commits into from
Aug 15, 2024

Conversation

1ec5
Copy link
Member

@1ec5 1ec5 commented Aug 9, 2024

By default, labels now show the user’s preferred language or the language specified in the URL, falling back to the contemporary local language (name). Only the styles on staging are supported while we wait for OpenHistoricalMap/issues#679 and OpenHistoricalMap/issues#775 to be deployed to production.

This functionality currently relies on mapbox-gl-language as a stopgap, but with all the miserable workarounds I’ve had to put in this PR, such as mapbox/mapbox-gl-language#63 (comment), I’m eager for OSM Americana’s much more robust localization functionality to become available for reuse: osm-americana/openstreetmap-americana#914.

With label localization in place, it becomes much more important to avoid viciously mangling Arabic text and Hebrew ktiv menuqad. I’ve installed the mapbox-gl-rtl-text plugin, which was installed on the main site in OpenHistoricalMap/issues#359.

For example, if you run npm install && npm start, here’s Roman Egypt in 700 CE in Coptic:

A map of Roman Egypt in 700 CE, with arrows pointing to three labels in Coptic for Rosetta, Damietta, and Faiyum.

Working towards OpenHistoricalMap/issues#481 and OpenHistoricalMap/issues#854.

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

Successfully merging this pull request may close these issues.

1 participant