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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ An [Emscripten](https://github.com/kripken/emscripten) port of a subset of the f

**Requires [mapbox-gl-js](https://github.com/mapbox/mapbox-gl-js) (version 0.32.1 and up).**

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


## Using mapbox-gl-rtl-text

Expand Down