You can pass in a {@link MapLocale} directly into this method which uses the language defined
in it to represent the language found on the map.

@param mapLocale the {@link MapLocale} object which contains the desired map language
@since 0.1.0
18551
public void setMapLanguage(@NonNull MapLocale mapLocale) {
    this.mapLocale = mapLocale;
    if (!style.isFullyLoaded()) {
      // We are in progress of loading a new style
      return;
    }

    List<Layer> layers = style.getLayers();
    for (Source source : style.getSources()) {
      if (sourceIsFromMapbox(source)) {
        boolean isStreetsV8 = sourceIsStreetsV8(source);
        for (Layer layer : layers) {
          if (layer instanceof SymbolLayer) {
            PropertyValue<?> textFieldProperty = ((SymbolLayer) layer).getTextField();
            if (textFieldProperty.isExpression()) {
              if (isStreetsV8) {
                convertExpressionV8(mapLocale, layer, textFieldProperty);
              } else {
                boolean isStreetsV7 = sourceIsStreetsV7(source);
                convertExpression(mapLocale, layer, textFieldProperty, isStreetsV7);
              }
            }
          }
        }
      } else {
        String url = null;
        if (source instanceof VectorSource) {
          url = ((VectorSource) source).getUrl();
        }
        if (url == null) {
          url = "not found";
        }
        Timber.w("The %s (%s) source is not based on Mapbox Vector Tiles. Supported sources:\n %s",
          source.getId(), url, SUPPORTED_SOURCES);
      }
    }
  }
496046
public void setLocale(final Locale LOCALE) {
        if (null == locale) {
            _locale = LOCALE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            locale.set(LOCALE);
        }
    }
16008
void setLanguage(final Locale locale) {

        if (!m_languageSelect.getValue().equals(locale)) {
            m_languageSelect.setValue(locale);
        }
    }
408313
@Override
  public final void setLang(final Languages pLang) {
    this.lang = pLang;
    if (this.itsId == null) {
      this.itsId = new IdI18nUnitOfMeasure();
    }
    this.itsId.setLang(this.lang);
  }
1281779
void switchLocale(final String locale) {

        if (locale.equals(m_locale)) {
            return;
        }
        m_locale = locale;
        m_basePanel.clear();
        destroyForm(false);
        final CmsEntity entity = m_entityBackend.getEntity(m_entityId);
        m_entityId = getIdForLocale(locale);
        // if the content does not contain the requested locale yet, a new node will be created
        final boolean addedNewLocale = !m_contentLocales.contains(locale);
        if (m_registeredEntities.contains(m_entityId)) {
            unregistereEntity(m_entityId);
        }
        if (addedNewLocale) {
            loadNewDefinition(m_entityId, entity, new I_CmsSimpleCallback<CmsContentDefinition>() {

                public void execute(final CmsContentDefinition contentDefinition) {

                    setContentDefinition(contentDefinition);
                    renderFormContent();
                    setChanged();

                }
            });
        } else {
            loadDefinition(m_entityId, entity, new I_CmsSimpleCallback<CmsContentDefinition>() {

                public void execute(CmsContentDefinition contentDefinition) {

                    setContentDefinition(contentDefinition);
                    renderFormContent();
                }
            });
        }
    }
1167779
@Override
  public final void setLang(final Languages pLang) {
    this.lang = pLang;
    if (this.itsId == null) {
      this.itsId = new IdI18nSeService();
    }
    this.itsId.setLang(this.lang);
  }
996538
public void addRequestedLocalization(final Object node, final String key, final String domain, final String locale, final Localization localization) {

		final GenericProperty keyKey    = new GenericProperty("key");
		final GenericProperty domainKey = new GenericProperty("domain");
		final GenericProperty localeKey = new GenericProperty("locale");
		final GenericProperty nodeKey   = new GenericProperty("node");

		boolean notContained = true;
		for (GraphObject gom : localizations) {
			if (notContained) {

				if (gom.getProperty(keyKey).equals(key) && gom.getProperty(domainKey).equals(domain) && gom.getProperty(localeKey).equals(locale)) {

					final GraphObject prevNode = (GraphObject)gom.getProperty(nodeKey);
					if (prevNode != null && node != null && prevNode.getUuid().equals(((GraphObject)node).getUuid())) {
						notContained = false;
					}
				}
			}
		}

		if (notContained) {

			final Map<String, Object> data = new HashMap();
			data.put("node", node);
			data.put("key", key);
			data.put("domain", domain);
			data.put("locale", locale);
			data.put("localization", localization);

			GraphObjectMap converted = GraphObjectMap.fromMap(data);

			if (!localizations.contains(converted)) {
				localizations.add(converted);
			}
		}
	}
815516
private static <T> T withinLocale(final Callable<T> operation, final Locale locale)
    {
        DefaultICUContext ctx = context.get();
        Locale oldLocale = ctx.getLocale();

        try
        {
            ctx.setLocale(locale);
            return operation.call();
        } catch (Exception e)
        {
            throw new RuntimeException(e);
        } finally
        {
            ctx.setLocale(oldLocale);
            context.set(ctx);
        }
    }
775435
public static synchronized void setLocale(String newLocale) throws UnsupportedLocaleException {
        Preconditions.checkArgument(newLocale == null, "newLocale == null");
        if (!newLocale.equals(CURRENT_LOCALE)) {
            LogCentral.setLocale(newLocale);
            CURRENT_LOCALE = newLocale;
        }
    }
637967
void setLocale(Locale locale)
   {
      m_taskNames = LocaleData.getStringArray(locale, LocaleData.TASK_NAMES);

      String name;
      m_taskNumbers.clear();

      for (int loop = 0; loop < m_taskNames.length; loop++)
      {
         name = m_taskNames[loop];

         if (name != null)
         {
            m_taskNumbers.put(name, Integer.valueOf(loop));
         }
      }
   }
1176626
@Override
    public String getEncodingFromLocale(Locale locale) {
        if (null == locale) {
            return null;
        }
        if (locale.equals(this.cachedLocale)) {
            return this.cachedEncoding;
        }

        String encoding = localeMap.get(locale.toString());
        if (null == encoding) {
            final String lang = locale.getLanguage();
            encoding = localeMap.get(lang + '_' + locale.getCountry());
            if (null == encoding) {
                encoding = localeMap.get(lang);
            }
        }

        this.cachedEncoding = encoding;
        this.cachedLocale = locale;

        return encoding;
    }
1308770
public void setLocale(Locale locale) throws CmsException {

        CmsUserSettings settings = getSettings();
        if (settings != null) {
            settings.setLocale(locale);
            settings.save(m_cms);
            m_messages = Messages.get().getBundle(locale);
        }
    }
879532
public function language($locale = null)
    {
        if ($locale !== null) {
            $this->language = $locale;
        }

        return $this->language;
    }
898268
public CmsUrlNameMappingFilter filterLocale(String locale) {

        if (locale == null) {
            throw new IllegalArgumentException();
        }
        CmsUrlNameMappingFilter result = new CmsUrlNameMappingFilter(this);
        result.m_locale = locale;
        return result;
    }
867715
public void setLocale(Locale locale) {
		if (!initialized) {
			super.setLocale(locale);
		} else {
			this.locale = locale;
			super.setLocale(locale);
			init();
		}
	}
643327
public void setContentLanguage(Locale locale) {
		checkCommitted();
		ContentLanguageHeader contentLanguageHeader =
			SipFactoryImpl.headerFactory.createContentLanguageHeader(locale);
		this.message.setContentLanguage(contentLanguageHeader);
	}
524778
public CmsGallerySearchResult getSearchResult(Locale locale) {

        if (!m_searchResultMap.containsKey(locale)) {
            CmsGallerySearchResult sResult;
            try {
                sResult = CmsGallerySearch.searchById(m_cms, m_resource.getStructureId(), locale);
                m_searchResultMap.put(locale, sResult);
            } catch (CmsException e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        return m_searchResultMap.get(locale);
    }