mapbox / mapbox-plugins-android

Mapbox Android Plugins are a collection of libraries that extend our other SDKs, helping you design powerful mapping features while the plugins handle most of the heavy lifting.
https://www.mapbox.com/android-docs/plugins/overview/
BSD 2-Clause "Simplified" License
241 stars 119 forks source link

language does not change in android but work in ios #1166

Closed anyway2019 closed 3 years ago

anyway2019 commented 3 years ago

the sdk and plugins :

    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.12.0'

the demo from example: Screenshot_2020-12-03-10-39-19-218_com onecoder myapplication

anyway2019 commented 3 years ago

compare the two picture(ios is Chinese but android is en) IMG_0481 PNG Screenshot_2020-12-03-10-51-20-070_com iostorn

anyway2019 commented 3 years ago

i have fixed it by specify StyleURL as below and add code localizationPlugin.setMapLanguage(MapLocale.CHINA); mapbox://styles/mapbox/streets-v10 mapbox://styles/mapbox/outdoors-v10 mapbox://styles/mapbox/dark-v9 mapbox://styles/mapbox/light-v9 mapbox://styles/mapbox/satellite-streets-v9 mapbox://styles/mapbox/traffic-day-v2 mapbox://styles/mapbox/traffic-night-v2