modules/acm/src/I18nHelper.php
public function getStoreLanguageMapping() {
    $mapping = [];

    $languages = $this->languageManager->getLanguages();

    // Prepare the alternate locale data.
    foreach ($languages as $lang => $language) {
      // For default language, we access the config directly.
      if ($lang == $this->languageManager->getDefaultLanguage()->getId()) {
        $config = $this->configFactory->get('acm.store');
      }
      // We get store id from translated config for other languages.
      else {
        $config = $this->languageManager->getLanguageConfigOverride($lang, 'acm.store');
      }

      $mapping[$lang] = $config->get('store_id');
    }

    return $mapping;
  }
public function getStoreLanguageMapping() {
    $mapping = [];

    $languages = $this->languageManager->getLanguages();

    // Prepare the alternate locale data.
    foreach ($languages as $lang => $language) {
      // For default language, we access the config directly.
      if ($lang == $this->languageManager->getDefaultLanguage()->getId()) {
        $config = $this->configFactory->get('acm.store');
      }
      // We get store id from translated config for other languages.
      else {
        $config = $this->languageManager->getLanguageConfigOverride($lang, 'acm.store');
      }

      $mapping[$lang] = $config->get('store_id');
    }

    return $mapping;
  }
public function getStoreLanguageMapping ( ) { $ mapping = [ ] ; $ languages = $ this -> languageManager -> getLanguages ( ) ; // Prepare the alternate locale data. foreach ( $ languages as $ lang => $ language ) { // For default language, we access the config directly. if ( $ lang == $ this -> languageManager -> getDefaultLanguage ( ) -> getId ( ) ) { $ config = $ this -> configFactory -> get ( 'acm.store' ) ; } // We get store id from translated config for other languages. else { $ config = $ this -> languageManager -> getLanguageConfigOverride ( $ lang , 'acm.store' ) ; } $ mapping [ $ lang ] = $ config -> get ( 'store_id' ) ; } return $ mapping ; }
Helper method to get mapping of all store ids and language codes.

@return array
Mapping array.
Helper method to get mapping of all store ids and language codes .