setLanguage static method

void setLanguage(
  1. String? language
)

Sets the language preference (BCP-47 tag).

Applies to every map, including the ones already on screen, whose sources reload. On Android and iOS, an invalid language is reported through MapWidget.onMapLoadErrorListener. On web, Mapbox GL JS does not surface that through the same listener.

Implementation

static void setLanguage(String? language) => _impl.setLanguage(language);