Closed 1ec5 closed 3 years ago
Hmm. Although the mapbox-streets-v7
spec https://www.mapbox.com/vector-tiles/mapbox-streets-v7/ says name_zh-Hans
exists, inspecting the vector tiles in Studio it appears to be missing. :thinking:
The documentation is a little confusing, but name_zh-Hans
is omitted from the country_label
, state_label
, and marine_label
layers.
/ref mapbox/mapbox-gl-native#12164
I'm closing this since https://github.com/mapbox/mapbox-gl-language/pull/39 added support for Simplified and Traditional Chinese while dropping v7 support
This PR adds support for Simplified Chinese, falling back on Chinese for certain low-zoom-level source layers that lack Simplified Chinese data in Streets source v7.
locale-utils has been added as a dependency. This library is used for locale code matching in various other Mapbox tools, so using it here ensures consistent behavior. As this is the library’s first dependency, its inclusion breaks the normal
<script>
tag usage that the examples rely on. A build step will need to be added to build a version of the library that the examples can include direclty.Additionally, a special case may need to be added for
mul
, as described in https://github.com/mapbox/mapbox-gl-language/pull/17#discussion_r199917148. locale-utils only supports valid IETF language tags, so supporting that PR’slocal
code would be less straightforward.Fixes #5.
/cc @lukasmartinelli @bsudekum @chriswu42