-
Notifications
You must be signed in to change notification settings - Fork 35
Automatically localize to user preferred language #36
Comments
This example is needed for parity with this GL JS example. Unlike the GL JS example, there won’t be any UI component, because we’d grab the preferred language from UILocale. |
If the goal of this example is to show how to localize labels, I feel like this effort would be better spent implementing mapbox/mapbox-gl-native#7031 and providing a friendly API for everyone. If, on the other hand, it’s meant as a runtime styling example, then I think we should skip the automatic localization in the name of code clarity. If they want localization, we could link to mapbox/mapbox-gl-native#6819 in the accompanying text. |
Automatically matching the user’s preferred language (or the application’s current UI language) is a real world use case. Forcing a specific language would make for a contrived example, although that’s precisely what we have for GL JS. You’re right that this example would lay bare the need for mapbox/mapbox-gl-native#7031, but that issue is currently blocked by mapbox/mapbox-gl-native#6584, which definitely won’t make it into v3.4.0. |
This will be a feature in v3.6.2, via mapbox/mapbox-gl-native#9582. |
We should have an example that localizes a Mapbox Streets–sourced style on the fly according to the user’s preferred language. It’d be similar to the code added in mapbox/mapbox-gl-native#6819, except that a hard-coded list of layers would be unnecessary because we’d iterate over all the symbol layers.
Requires v3.4.0 for the runtime styling API. mapbox/mapbox-gl-native#7031 would completely obviate this example.
/cc @friedbunny
The text was updated successfully, but these errors were encountered: