@param string $languageCode

@return bool
966443
public function isTargetLanguageVersionExist(string $languageCode): bool
    {
        $languages = $this->repository->getContentLanguageService()->loadLanguages();
        foreach ($languages as $language) {
            if ($language->enabled && $language->languageCode == $languageCode) {
                return true;
            }
        }

        return false;
    }
1358729
public function loadByLanguageCode($languageCode)
    {
        $languages = $this->languageMapper->extractLanguagesFromRows(
            $this->languageGateway->loadLanguageListDataByLanguageCode([$languageCode])
        );

        if (count($languages) < 1) {
            throw new NotFoundException('Language', $languageCode);
        }

        return reset($languages);
    }
960452
protected static function transformCode( $languageCode )
	{
		$isoCode	= $languageCode;
		if( $languageCode == "en" || $languageCode == "uk" )
			$isoCode = "gb";
		if( $languageCode == "cs" )
			$isoCode = "cz";
		return $isoCode;
	}
165023
public function isLanguageVersionExist(Content $content, string $languageCode): bool
    {
        return \in_array($languageCode, $content->versionInfo->languageCodes);
    }
1278993
public static function TypeCodeIsNodeType( $typeCode )
		{
			switch ( $typeCode )
			{
				case XmlTypeCode::Node:
				case XmlTypeCode::Element:
				case XmlTypeCode::Attribute:
				case XmlTypeCode::Document:
				case XmlTypeCode::Comment:
				case XmlTypeCode::Text:
				case XmlTypeCode::ProcessingInstruction:
					return true;
			}
			return false;
		}
1323648
public static function getLangCode2($langCode)
    {
        $langList = static::activeLanguagesArray();
        foreach ($langList as $lang) {
            if ($lang['code3'] == $langCode) return $lang['code2'];
            if ($lang['code_full'] == $langCode) return $lang['code2'];
            if (strtolower($lang['name_en']) == strtolower($langCode)) return $lang['code2'];
            if (strtolower($lang['name_orig']) == strtolower($langCode)) return $lang['code2'];
        }
        return substr($langCode, 0, 2); //?? or return false
    }
1105190
public static function countryLocaleCode($countryCode)
    {
        $countryLocaleCodes = static::countryLocaleCodes($countryCode);
        if ($languageCode = Language::countryLanguageCode($countryCode)) {
            $languageLocaleCodes = static::languageLocaleCodes($languageCode);
            if ($localeCodes = array_intersect($languageLocaleCodes, $countryLocaleCodes)) {
                return reset($localeCodes);
            } elseif ($countryLocaleCodes) {
                return reset($countryLocaleCodes);
            } elseif ($languageLocaleCodes) {
                return reset($languageLocaleCodes);
            }

            return \Locale::composeLocale([
                'language' => $languageCode,
                'region' => $countryCode,
            ]);
        }

        if (!count($countryLocaleCodes)) {
            return null;
        } elseif (count($countryLocaleCodes) == 1) {
            return reset($countryLocaleCodes);
        }

        if ($localeCode = static::findMainCode($countryLocaleCodes)) {
            return $localeCode;
        }

        foreach ($countryLocaleCodes as $localeCode) {
            $languageCode = static::languageCode($localeCode);
            if (!strcasecmp($languageCode, $countryCode)) {
                return $localeCode;
            }
        }

        return reset($countryLocaleCodes);
    }
114737
public static function isLanguageEnabled($code)
    {
        if ($code == 'en') {
            return true;
        }

        $handle = (isset(self::$_languages[$code])) ? self::$_languages[$code]['handle'] : '';
        $enabled_extensions = array();

        // Fetch list of active extensions
        if (class_exists('Symphony', false) && (!is_null(Symphony::ExtensionManager()))) {
            $enabled_extensions = Symphony::ExtensionManager()->listInstalledHandles();
        }

        return in_array('lang_' . $handle, $enabled_extensions);
    }
1266692
private function getLanguage(array $languageCodes, $mainLanguageCode, $alwaysAvailable)
    {
        $languageCodesSet = array_flip($languageCodes);

        foreach ($this->settings->prioritizedLanguages as $languageCode) {
            if (isset($languageCodesSet[$languageCode])) {
                return $languageCode;
            }
        }

        if ($this->settings->useAlwaysAvailable && $alwaysAvailable) {
            return $mainLanguageCode;
        }

        return null;
    }
437260
public function setDefaultLanguage($isoCode)
    {
        //====================================================================//
        // Safety Checks ==> Verify Language ISO Code
        if (!is_string($isoCode) || (strlen($isoCode) < 2)) {
            Splash::log()->err("Default Language ISO Code is Invalid");

            return $this;
        }
        //====================================================================//
        // Store Default Language ISO Code
        $this->dfLanguage = $isoCode;

        return $this;
    }
830984
public function getLanguageNames(array $languageCodes, $locale)
    {
        $apiCall = new ApiCall\GetLanguageNames($languageCodes, $locale);

        return $this->call($apiCall);
    }
1100444
private function prepareName($languageCode) {
        foreach ($this->container->getParameter('chill_main.available_languages') as $lang) {
            $names[$lang] = Intl::getLanguageBundle()->getLanguageName($languageCode);
        }
        
        return $names;
    }
197757
protected function _validateLanguageCode($langCode)
    {
        if (!$this->_langHelper->validateLanguageCode($langCode)) {
            throw Mage::exception('Radial_Core', $this->_coreHelper->__(self::INVALID_LANGUAGE_CODE_MESSAGE));
        }
        return $this;
    }
45850
public function getLanguageName(string $languageCode): string
    {
        $posixLanguageCode = $this->localeConverter->convertToPOSIX($languageCode);
        if ($posixLanguageCode === null) {
            return '';
        }

        $posixLanguageCode = mb_substr($posixLanguageCode, 0, 2);
        $languageName = Intl::getLanguageBundle()->getLanguageName($posixLanguageCode, null, $posixLanguageCode);

        return ucwords($languageName);
    }
436429
function setCurrentLanguage( $languageCode )
    {
        $this->CurrentLanguage = $languageCode;
        if ( $this->hasContentObject() )
        {
            $this->ContentObject->setCurrentLanguage( $languageCode );
        }
        $this->Name = null;
    }
112655
public function getTranslationsForLanguage($languageCode)
    {
        if (!$this->isLanguageAvailable($languageCode)) {
            return false;
        }
        $data = file_get_contents(PIWIK_INCLUDE_PATH . "/lang/$languageCode.json");
        $translations = json_decode($data, true);
        $languageInfo = array();
        foreach ($translations as $module => $keys) {
            foreach ($keys as $key => $value) {
                $languageInfo[] = array(
                    'label' => sprintf("%s_%s", $module, $key),
                    'value' => $value
                );
            }
        }

        foreach (PluginManager::getInstance()->getLoadedPluginsName() as $pluginName) {
            $translations = $this->getPluginTranslationsForLanguage($pluginName, $languageCode);

            if (!empty($translations)) {
                foreach ($translations as $keys) {
                    $languageInfo[] = $keys;
                }
            }
        }

        return $languageInfo;
    }
1227232
public function listGlobalEntries($languageCode = null, $offset = 0, $limit = -1)
    {
        try {
            return $this->innerGateway->listGlobalEntries($languageCode, $offset, $limit);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }