Get alphabet for language

@param string $language

@return Alphabet|null
500652
public function get($language)
    {
        if (!isset($this->alphabets[$language])) {
            // Not found alphabet for language
            return null;
        }

        return $this->alphabets[$language];
    }
334252
public function getLanguageCode($lang = null)
    {
        $parts = $this->_callInternalLocale('parseLocale', null, $lang, false);
        return isset($parts['language']) ? $parts['language'] : null;
    }
378753
protected function checkLanguage($language)
    {
        $full_language = mb_strtolower($language);
        $lang = substr($full_language, 0, 2);
        if ($lang == 'jp') {
            $lang = 'ja';
        } elseif ($lang == 'pt') {
            $lang = 'pt_BR';
        } elseif ($lang == 'ug') {
            $lang = 'ug_CN';
        } elseif ($lang == 'zh') {
            $lang = ($full_language == 'zh-tw' || $full_language == 'zh_tw') ? 'zh_TW' : 'zh_CN';
        } elseif ($lang == 'be') {
            // for belarusian use russian instead english
            $lang = 'ru';
        }
        return $lang;
    }
1199407
public function doesAcceptLanguage($language = 'en')
	{
		return (in_array(strtolower($language), $this->getAcceptLanguages(), true)) ? true : false;
	}
156331
private function getLanguage(string $language): string
    {
        $language = trim($language);

        if (strlen($language) === 2) {
            $language = "{$language}-{$language}";
        }

        if (!preg_match("/^[a-z]{2}-[a-z]{2}$/i", $language)) {
            throw new InvalidArgumentException("Unexpected language code ({$language}), codes should be 2 characters, a hyphen, and a further 2 characters");
        }

        list($main, $sub) = explode("-", $language);
        $language = strtolower($main) . "-" . strtoupper($sub);

        return $language;
    }
405903
protected function lang($language)
    {
        $pos = array_search($language, $this->request->getAcceptLanguage());
        if ($pos === FALSE) {
            throw new NotAcceptableException('No matching method for response type "'.join(', ', $this->request->getAcceptLanguage()).'"');
        }
        return count($this->request->getAcceptLanguage()) - $pos;
    }
568181
public function get($key) 
    {
        return isset($this->langs[$key]) ? $this->langs[$key] : $key;
    }
1290627
public function getStopWordsFromLanguage(string $language = 'de'): array
  {
    if (\in_array($language, self::$availableLanguages, true) === false) {
      throw new StopWordsLanguageNotExists('language not supported: ' . $language);
    }

    if (!isset($this->stopWords[$language])) {
      $this->loadLanguageData($language);
    }

    return $this->stopWords[$language];
  }
1273167
public function get($language)
    {
        $result = array();
        if (isset($this->{$language})) {
            $result = $this->{$language};
        }
        if ($language !== 'nl' && isset($this->nl)) {
            $result += $this->nl;
        }
        return $result;
    }
837610
public function getNameByKey($key)
    {
        return (array_key_exists($key, $this->_languages)) ? $this->_languages[$key] : null;
    }
455833
public function getTranslation($language = null)
    {
        if ($language === null) {
            $language = $this->getLanguage();
        }

        if (!isset($this->owner->{$this->translationsAttribute}[$language])) {
            $this->owner->{$this->translationsAttribute}[$language] = $this->loadTranslation($language);
        }

        return $this->owner->{$this->translationsAttribute}[$language];
    }
488760
public function getTranslation($language = null)
    {
        $language = $language ?: Yii::$app->language;
        $translations = $this->getModelTranslations();

        // search translation by language in exists translations
        foreach ($translations as $translation) {
            // if translation exists - return it
            if ($translation->getAttribute($this->translationLanguageAttrName) === $language) {
                $this->translationsBuffer[] = $translation;

                return $translation;
            }
        }

        // if translation doesn't exist - create and return
        $translationEntityClass = $this->owner->getRelation($this->translationRelationName)->modelClass;

        /* @var BaseActiveRecord $translation */
        $translation = new $translationEntityClass();
        $translation->setAttribute($this->translationLanguageAttrName, $language);
        $translations[] = $translation;
        $this->translationsBuffer = $translations;
        $this->owner->populateRelation($this->translationRelationName, $translations);

        return $translation;
    }
1371321
public function getOptionsByLang($lang = 'en')
    {
        $finalOptions = [];

        foreach ($this->getOptions() as $options) {
            foreach ($options as $option) {
                if ($option->lang == $lang || $option->isPlain) {
                    $finalOptions[] = $option;
                }
            }
        }

        return empty($finalOptions) ? null : $finalOptions;
    }
45270
public function getTranslation($language = null)
    {
        if (!$language) {
            $language = $this->getLanguage();
        }
        if (!isset($this->_models[$language])) {
            $this->_models[$language] = $this->getNewTranslation($language);
        }
        return $this->_models[$language];
    }
147434
public function getLanguage($language)
    {
        if (!$this->getLanguages()->has($language)) {
            $this->getLanguages()->set($language, new LanguageBag());
        }

        return $this->getLanguages()->get($language);
    }
954777
public function get_translation(\Skeleton\I18n\Language $language) {
		$classname = $this->classname;
		$class = $classname::get_by_id($this->object_id);
		$label = 'text_' . $language->name_short . '_' . $this->label;
		return $class->$label;
	}
310420
public function language($language = null) {
		$this->getRequest()->allowMethod(['post']);

		$allowedLanguages = (array)Configure::read('Config.allowedLanguages');
		if (!$language) {
			$language = Configure::read('Config.defaultLanguage');
		}
		if (!$language) {
			$keys = array_keys($allowedLanguages);
			$language = $allowedLanguages[array_shift($keys)];
		}

		if (!array_key_exists($language, $allowedLanguages)) {
			throw new RuntimeException('Invalid Language');
		}
		$language = $allowedLanguages[$language];

		$this->getRequest()->getSession()->write('Config.language', $language['locale']);
		I18n::setLocale($language['locale']);
		$this->Flash->success(__d('tools', 'Language switched to {0}', $language['name']));
		return $this->redirect($this->referer('/', true));
	}