-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Language support #1108
Comments
As another point of comparison, Google Maps (iOS app and SDK) defaults to device language with no exposed setting or API for switching. Labels in "foreign" places will display both your device language (where available) and the appropriate local name. Meanwhile, Apple will try to draw labels in the device language and (almost always) fallback to local. Google's data is far superior to Apple's, but both have outdated names for things like stadiums. It also appears that Google has done some machine translation of common place names. OSM has very, very few localized (non-English) names in Portland. More pressingly, setting a -native or -JS map to strictly Japanese results in no labels at all because Mapbox currently only supports English, French, Spanish, and German. |
Proper support here, including RTL and complex text shaping is a bit out of scope, so moving off of b2 milestone for now. |
To be clear, this ticket is about dynamically showing labels in whatever system language is being used at runtime. Currently that would require a large number of styles or a large number of classes in a single style (although we don't currently expose style classes to iOS SDK clients), to be toggled manually by client code. This is because label text is baked into the Mapbox Streets source, rather than decoupled into a separate source that can be parameterized by locale. |
@1ec5 Not sure I understand your comment. Did you look at how the example works? It doesn't use multiple styles or style classes. |
Oops, I thought this was a gl-js ticket. For gl-native, the upshot is that once we have a style API in native, we can do the same as the gl-js example -- changing the feature property used for the label. |
#6819 (comment) would port the GL JS example to iosapp. If we were to truly have parity with MapKit, the SDK would have to automatically switch languages rather than forcing the developer to. However, that would require style-specific logic. |
#7031 outlines a concrete approach to automatically localizing the map that I think would be feasible. |
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions. |
How will language support work in the new SDK? Will this be the country's language by default, or can you set it to the language of the OS (this is what Apple Maps does, they have a toggle to always have it in English)? Just something to think about.
cc. @incanus @1ec5 @peterqliu
The text was updated successfully, but these errors were encountered: