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

Gloss names of places in the local language #471

Closed
1ec5 opened this issue Jul 2, 2022 · 2 comments · Fixed by #592
Closed

Gloss names of places in the local language #471

1ec5 opened this issue Jul 2, 2022 · 2 comments · Fixed by #592
Assignees
Labels
enhancement New feature or request internationalization openmaptiles A change is needed in OpenMapTiles to support this

Comments

@1ec5
Copy link
Member

1ec5 commented Jul 2, 2022

World political maps and atlases by American publishers typically show well-known places in English but also gloss the name in the local language when it differs from the English name. Typically, the local name is shown in parentheses and/or italics, and sometimes on a separate line in smaller type.

Rand McNally

I’ve seen these glosses on labels of populated places, but rarely on other kinds of features. I suppose there are a variety of reasons:

  • Many anglicized city names are less well-known than official English names of countries.
  • A waterway may form an international boundary and thus have a whole host of local names, but consistency along the length of the waterway is often prioritized.
  • Labels for non-place POIs are already long enough to risk getting collided out by POI labels without getting doubled in length by the gloss.
  • Political maps rarely label anything less significant than a populated place.

We should consider glosses for other feature types at higher zoom levels, where collision isn’t as much of a concern, but populated places seems like a good place to start.

To achieve the gloss, we can set text-field to a format expression that includes both name:en and name when the two properties differ. A collator expression can be passed into the string comparison to perform case and diacritic folding.

/ref #100 #428

@1ec5 1ec5 added enhancement New feature or request internationalization labels Jul 2, 2022
@1ec5
Copy link
Member Author

1ec5 commented Jul 2, 2022

The ability to choose a base language other than English (#20 #21) would complicate this feature somewhat, but even in English there are some edge cases to consider:

  • Since “Montreal” and “Montréal” differ by only diacritics, it’s probably fine to render it as just “Montréal” instead of “Montreal (Montréal)”.
  • Hong Kong’s place name labels are bilingual in both English and Chinese, so the expression would need to avoid duplicating the English name. For example, it should be “Kowloon (九龍)”, not “Kowloon (九龍 Kowloon)”.

@1ec5
Copy link
Member Author

1ec5 commented Jul 2, 2022

For local names written in non-Latin writing systems, National Geographic and Rand McNally show romanizations rather than the local name verbatim. In principle, name:latin could be used for this purpose, but there are some problems with that automated approach: onthegomap/planetiler#86.

In the absence of a reliable source of romanizations, we’re left to display names in arbitrary writing systems, which will inevitably run into font issues along the lines of #393.

@1ec5 1ec5 added the openmaptiles A change is needed in OpenMapTiles to support this label Jul 2, 2022
@1ec5 1ec5 self-assigned this Nov 28, 2022
@1ec5 1ec5 closed this as completed in #592 Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internationalization openmaptiles A change is needed in OpenMapTiles to support this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant