Challenges with internationalization of text-field #3104
Unanswered
markconnellypro
asked this question in
Q&A
Replies: 1 comment
-
you can use for example:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure if this should go here or under maplibre-style-spec, but I am having some difficulty with getting labels to appear when switching to non-English languages using the text-field value. Part of the issue is that the delimiter between name and the language code is not consistent -- for example, even in the examples, it is sometimes a colon and sometimes an underscore (and in the data I am using, it is similarly unpredictable):
https://maplibre.org/maplibre-gl-js/docs/examples/display-and-style-rich-text-labels/
https://maplibre.org/maplibre-gl-js/docs/examples/language-switch/
Is there any way to establish a failover order to ensure a label is always present on the map (either as part of the style or transparently through MapLibre GL JS)? For example, if the text-field in the style is name:fr, it first tries that exact value, then name_fr, then name.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions