mapbox-maps-flutter icon indicating copy to clipboard operation
mapbox-maps-flutter copied to clipboard

localize labels appears to be broken

Open j-bbr opened this issue 6 months ago • 1 comments

I am trying to display a map with localized labels, using the StyleManager function localizeLabels which according to documentation should do just do that

Function to localize style labels. @param locale The locale to apply for localization @param layerIds The ids of layers that will localize on, default is null which means will localize all the feasible layers.

But testing with different common locales like below seems to change absolutely nothing await mapboxMap?.style.localizeLabels('es', null);

j-bbr avatar Aug 01 '25 10:08 j-bbr

Thanks for the report. You are correct that .localizeLabels() does not work for Mapbox Standard (our default style) or Mapbox Standard Satellite. In short, Mapbox Standard introduced a new basemap approach that changed how layers are handled at runtime. As you've identified, this means that the .localizeLabels() approach to translating map labels does not work for these styles. We are working on a different approach to runtime localization and will share updates on that when we have them.

If translation using .localizeLabels() is important for your project, I recommend creating a style based on one of our classic styles, such as Mapbox Streets.

pjleonard37 avatar Aug 01 '25 12:08 pjleonard37