@param string $key
@param string $language

@return string
7592
public function getLabel($key, $language)
    {
        if (!is_array($this->labels) || !array_key_exists($key, $this->labels)) {
            return 'n/a';
        }

        if (!is_array($this->labels[$key]) || !array_key_exists($language, $this->labels[$key])) {
            return 'n/a';
        }

        return $this->labels[$key][$language];
    }
22783
protected function getMessage($bundle, $key, $language)
    {
        $keyRecord = $this->getKeyRepository()->findOneBy(array(
                'project'  => $this->project,
                'bundle'   => $bundle,
                'key'      => $key,
            )
        );

        if(!$keyRecord){
            return null;
        }
        /** @var Message $message */
        $message = $this->getMessageRepository()->findOneBy(array(
                'key'      => $keyRecord,
                'language' => $language,
            )
        );
        return $message;
    }
590388
public function setMessage($key, $value, $language) {
		$messageFile = $this->getMessageLanguageForLanguage($language);
		$messageFile->setMessage($key, $value);
		$messageFile->save();
	}
1271784
protected function custom($key, $lang)
    {
        return ($this->_replaceWithCustom[$key]) ? $this->_custom[$key] : $lang;
    }
403422
protected function getTranslation(string $key, string $locale)
    {
        return $this->translations()
            ->where('key', $key)
            ->where('locale', $locale)
            ->value('translation');
    }
837610
public function getNameByKey($key)
    {
        return (array_key_exists($key, $this->_languages)) ? $this->_languages[$key] : null;
    }
1046892
function keyTranslate( $key )
    {
        $trans = null;
        for ( $i = 0; $i < count( $this->Handlers ) and $trans === null; ++$i )
        {
            $handler = $this->Handlers[$i];
            if ( $handler->isKeyBased() )
                $trans = $handler->keyTranslate( $key );
        }
        return $trans;
    }
617394
public static function getLang($language)
    {
        $pos = strpos($language, '-');
        return $pos > 0 ? substr($language, 0, $pos) : $language;
    }
1095574
protected function translate($key)
  {
    $key = strtoupper($key);
    if ( isset(self::$translations[$key]) ){
      return self::$translations[$key];
    }
    
    return $key;
  }
1262858
public function translate(string $key) {
        if (!$this->supports($key)) {
            return $key;
        }

        return $this->translations[$key];
    }
924205
public static function get($key)
    {
        exception_if(!array_has(self::$words, $key), LanguageKeyNotFoundException::class, $key);

        return array_get(self::$words, $key);
    }
698882
public function __lang($key, ...$args)
    {
        $string = array_key_exists($key, $this->messages_dictionary) ? $this->messages_dictionary[$key] : $key;
        return (func_num_args() > 1) ? vsprintf($string, $args) : $string;
    }
464098
public function trans($key, array $args = [], $lang = null)
    {
        return $this->translate($key, $args, $lang);
    }
891119
function keyTranslate( $key )
    {
        $num = $this->keyPick( $key );
        if ( $num >=0 and $num <= count( $this->Handlers ) )
        {
            $handler = $this->Handlers[$num];
            return $handler->keyTranslate( $key );
        }

        return null;
    }
944592
protected function getStoreTranslation($key, $locale) {
        if( ! isset($this->translations[$locale][$key]) )  {
            $response = $this->apiRequest(
                $this->getAttribute('api_url'), [ 'text' => $key, 'lang' => $locale]
            );

            $response = json_decode($response, true);

            $this->translations[$locale][$key] = $response['text'][0];
        }

        return $this->translations[$locale][$key];
    }
137548
public function getSpecialTid($language, $key)
    {
        $languageSpecialTids = $this->getSpecialTidsForLanguage($language);

        if (!empty($languageSpecialTids[$key])) {
            return $languageSpecialTids[$key];
        }

        return null;
    }
1122471
protected function translateForNewTypo3($key)
    {
        if (isset($this->localizedLabels[$this->languageKey][$key][0]['target'])) {
            $translation = $this->localizedLabels[$this->languageKey][$key][0]['target'];
        } elseif (
            ($this->alternativeLanguageKey !== '')
            && isset($this->localizedLabels[$this->alternativeLanguageKey][$key][0]['target'])
        ) {
            $translation = $this->localizedLabels[$this->alternativeLanguageKey][$key][0]['target'];
        } elseif (isset($this->localizedLabels['default'][$key][0]['target'])) {
            $translation = $this->localizedLabels['default'][$key][0]['target'];
        } else {
            $translation = $key;
        }

        return $translation;
    }