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

Update README.md to elaborate on Hebrew map label use case. #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adrianababakanian
Copy link

Previously, the README did not elaborate on the fact that Hebrew labels do not have the same global support as Arabic labels made possible via mapbox-gl-language. It's worth surfacing that Hebrew labels need to be configured in the Mapbox style itself before the RTL plugin can be useful, to avoid confusion.

A map that requires Arabic names should at a minimum install the `mapbox-gl-rtl-text` plugin. To display the actual place names, the map could use a specially modified style, manipulate the style at runtime, or install the [`mapbox-gl-language`](https://github.com/mapbox/mapbox-gl-language/) plugin for convenience. The `mapbox-gl-language` plugin displays Arabic name data (among other languages), while the `mapbox-gl-rtl-text` plugin adds support for displaying Arabic names.
A map that requires Arabic names should at a minimum install the `mapbox-gl-rtl-text` plugin. To display the actual place names, the map could use a specially modified style, manipulate the style at runtime, or install the [`mapbox-gl-language`](https://github.com/mapbox/mapbox-gl-language/) plugin for convenience. The `mapbox-gl-language` plugin displays Arabic name data (among other languages), while the `mapbox-gl-rtl-text` plugin adds support for displaying Arabic names.

Although the [`mapbox-gl-language`](https://github.com/mapbox/mapbox-gl-language/#languages) plugin supports the Arabic language globally, Hebrew labels are only supported for areas where Hebrew is the local language. In the Mapbox Streets v8 tileset, the [`name_script`](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#name_script-text) field evaluates to `Hebrew` for geometries with [`name`](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#name-text--name_lang-code-text) fields in these areas. To display Hebrew place names where available, first [change the label language in Mapbox Studio](https://docs.mapbox.com/help/troubleshooting/change-language/#change-label-language-in-mapbox-studio) by setting the text field to `name`. Then, set up the map to use this style and the RTL plugin as shown in the [add support for right-to-left scripts example](https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adrianababakanian The clarification regarding availability of Hebrew names should also be added to the gl-language readme and/or the streets v8 tileset documentation. Ideally, there is a better documentation around this instead of finding it in the plugin readme.

Suggested change
Although the [`mapbox-gl-language`](https://github.com/mapbox/mapbox-gl-language/#languages) plugin supports the Arabic language globally, Hebrew labels are only supported for areas where Hebrew is the local language. In the Mapbox Streets v8 tileset, the [`name_script`](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#name_script-text) field evaluates to `Hebrew` for geometries with [`name`](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#name-text--name_lang-code-text) fields in these areas. To display Hebrew place names where available, first [change the label language in Mapbox Studio](https://docs.mapbox.com/help/troubleshooting/change-language/#change-label-language-in-mapbox-studio) by setting the text field to `name`. Then, set up the map to use this style and the RTL plugin as shown in the [add support for right-to-left scripts example](https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/).
A map that requires Arabic or Hebrew names should at a minimum install the `mapbox-gl-rtl-text` plugin. To display the actual place names, the map could use a specially modified style, manipulate the style at runtime, or install the [`mapbox-gl-language`](https://github.com/mapbox/mapbox-gl-language/) plugin for convenience. The `mapbox-gl-language` plugin displays Arabic and Hebrew name data (among other languages), while the `mapbox-gl-rtl-text` plugin adds support for displaying names in those languages.
Although the [`mapbox-gl-language`](https://github.com/mapbox/mapbox-gl-language/#languages) plugin supports the Arabic language globally, Hebrew labels are only supported for areas where Hebrew is the local language. In the Mapbox Streets v8 tileset, the [`name_script`](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#name_script-text) field evaluates to `Hebrew` for geometries with [`name`](https://docs.mapbox.com/vector-tiles/reference/mapbox-streets-v8/#name-text--name_lang-code-text) fields in these areas. To display Hebrew place names where available, first [change the label language in Mapbox Studio](https://docs.mapbox.com/help/troubleshooting/change-language/#change-label-language-in-mapbox-studio) by setting the text field to `name`. Then, set up the map to use this style and the RTL plugin as shown in the [add support for right-to-left scripts example](https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-rtl-text/).

cc @mapbox/docs

@asheemmamoowala asheemmamoowala changed the base branch from master to main June 17, 2020 00:38
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.

None yet

2 participants