Return TRUE if passed language is available for translation.

@param	string	Language key.

@return	boolean
497693
public function stringExists($key) {
		
		// load translation strings
		$this->loadStrings();
		
		if (array_key_exists($key, $this->strings) or array_key_exists($key, $this->defaultStrings)) {
			return TRUE;
		} else {
			return FALSE;
		}
		
	}
773728
def _is_lang_change(self, request):
        """"""
        if 'lang' not in request.GET:
            return False

        return not any(request.path.endswith(url) for url in self.exempt_urls)
53205
public function setLang( $lang ) {
		if ( !IntuitionUtil::nonEmptyStr( $lang ) ) {
			return false;
		}
		$this->currentLanguage = $this->normalizeLang( $lang );
		return true;
	}
523356
function (language) {
  for (var i in config.languages) {
    if (config.languages[i] === language) {return true;}
  }
  //
  return false;
}
402706
public static function validate($language)
    {
        if (\in_array(\strtolower($language), self::$validLanguageCode, true)) {
            return \strtolower($language);
        }

        return false;
    }
831373
public function setLanguage($language)
    {
        $language = $language ?: $this->language;
        if (!in_array($language, $this->getSupportedLanguages())) {
            throw new LanguageNotSupportedException(sprintf('Language [%s] is not supported', $language));
        }

        $this->language = $language;
        $this->changeBaseApi();
        return true;
    }
66274
public static function isValidLanguageRegex(string $language)
    {
        $match = false;

        if (preg_match(self::$validISOLanguageRegex, $language)) {
            $match = true;
        }

        if (preg_match(self::$validBCP47LanguageRegex, $language)) {
            $match = true;
        }

        return $match;
    }
448200
public function has($key, $locale = null) {
        $locale = $this->locale($locale);

        return Lang::has($key, $locale);
    }
504866
public static function has($key, $lang = null)
    {
        $lang = $lang ?: static::$lang;
        return isset(static::$langs[$lang][$key]);
    }
1341867
public function isIncludeDefaultLanguage($lang = null)
    {
        // if active lang is not passed in, use current active
        if (!$lang) {
            $lang = $this->getLanguage();
        }

        return !($this->default === $lang && $this->config->get('system.languages.include_default_lang') === false);
    }
656030
private function hasLocale(string $locale): bool
    {
        assert(empty($locale) === false);

        $result = in_array($locale, $this->getLocales());

        return $result;
    }
855347
public static function checkLanguage($country, $language)
    {
        switch($country) {
        case KlarnaCountry::AT:
        case KlarnaCountry::DE:
            return ($language === KlarnaLanguage::DE);
        case KlarnaCountry::NL:
            return ($language === KlarnaLanguage::NL);
        case KlarnaCountry::FI:
            return ($language === KlarnaLanguage::FI);
        case KlarnaCountry::DK:
            return ($language === KlarnaLanguage::DA);
        case KlarnaCountry::NO:
            return ($language === KlarnaLanguage::NB);
        case KlarnaCountry::SE:
            return ($language === KlarnaLanguage::SV);
        default:
            //Country not yet supported by Klarna.
            return false;
        }
    }
1115361
public function deleteTranslation($key, $language = null) {
		if($language === null) {
			$languages = $this->getLanguageList();
		}
		else {
			$languages = array($language);
		}
		foreach ($languages as $language) {
			$messageFile = $this->getMessageFile($language);
			$messageFile->deleteMessage($key);
			$messageFile->save();
			
			unset($this->messages[$language][$key]);
		}
	}
1172119
public function hasTranslation($locale)
    {
        foreach ($this->translations as $translation) {
            if ($locale == $translation->locale) {
                return $translation;
            }
        }
        return false;
    }
164871
private function _checkLanguage(&$language)
    {
        if (!isset($language)) {
            throw new Klarna_ArgumentNotSetException("Language");
        }
        if (is_numeric($language) && !is_int($language)) {
            $language = intval($language);
        }
        if (!is_numeric($language) || !is_int($language)) {
            throw new Klarna_InvalidTypeException("Language", "integer");
        }
    }
1119737
public function has($key, $locale = null) {
        $locale = $this->locale($locale);

        return $this->get($key, [], $locale) !== $key;
    }
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);
    }