code: private function getExcludedLanguageCodes(array $languageCodes, $selectedLanguageCode = null)
      {
          $excludedLanguageCodes = array();
  
          foreach ($languageCodes as $languageCode) {
              if ($selectedLanguageCode !== null && $languageCode === $selectedLanguageCode) {
                  break;
              }
  
              $excludedLanguageCodes[] = $languageCode;
          }
  
          return $excludedLanguageCodes;
      }
docs: Returns a list of language codes to be excluded when matching translation in given
  $selectedLanguageCode.
  
  If $selectedLanguageCode is omitted, all languages will be returned.
  
  @param string[] $languageCodes
  @param null|string $selectedLanguageCode
  
  @return string[]