The Mapbox Localization Extension for Android is a public library for localizing labels for a MapView. This extension library can localize supported languages in mapbox-streets-v8 and mapbox-streets-v7
A full overview of classes and interfaces can be found in our API documentation.
This README is intended for developers who are interested in contributing to the Mapbox Localization Extension for Android. Please visit DEVELOPING.md for general information and instructions on how to use the Mapbox Maps Extension System. To add the Localization Extension to your project, you configure its dependency in your build.gradle
files.
// In the root build.gradle file
// The Mapbox access token needs to a scope set to DOWNLOADS:READ
allprojects {
repositories {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = "INSERT_MAPBOX_ACCESS_TOKEN_HERE"
}
}
}
}
// In the app build.gradle file
dependencies {
implementation 'com.mapbox.extension:maps-localization:11.6.0-rc.1'
}
Customizing Mapbox Localization Extension for Android could be done in two ways: by either providing your own version of the Localization Extension or by using the existing Localization Extension API. The former is documented in DEVELOPING.md, the latter can be achieved with:
mapboxMap.loadStyleUri(styleUri) {
it.localizeLabels(selectedLocale)
}
More concrete examples of the Localization Extension can be found in our test application.
View LICENSE.md for all dependencies used by this extension.