You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
@dunqi, this issue was tracking a bug affecting the localization of UI strings within the iOS map SDK, not map labels.
MapboxStatic.swift doesn’t have a localizesLabels option as the iOS map SDK does, but it does allow you to specify a custom style URL. In Mapbox Studio, create a new style based on one of the templates, then change the language of each layer containing labels. Finally, click the “Share, develop & use” button to get the style URL that you can set on SnapshotOptions.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugiOSMapbox Maps SDK for iOSlocalizationHuman language support and internationalization
Our replacement
NSLocalizedString
methods rely on+[NSBundle mgl_frameworkBundle]
to provide the Mapbox bundle that contains the localizations.When using the static Mapbox.framework:
+[NSBundle mgl_frameworkBundle]
returns the app bundle (not Mapbox.framework or Mapbox.bundle).This means that localizations never load because we’re looking for them in the base app bundle, not Mapbox.bundle.
(Mapbox.bundle has existed for static builds since #4455.)
Why do images and such work?
For other resources that we load from the bundle, like images or SSL certificates, we manually append
Mapbox.bundle
to the path using-[NSBundle mgl_resourcesDirectory]
:This works, but seems like incorrect behavior: shouldn’t we be treating Mapbox.bundle as the bundle and not just a directory?
/cc @boundsj @1ec5
The text was updated successfully, but these errors were encountered: