Get the translation for the given key.

{@inheritdoc}
491821
public function get($key, array $replace = [], $locale = null, $fallback = true)
    {
        // If we have a CMS-prefixed version, use it.
        if ( ! $this->isCmsPrefixed($key)) {
            $prefixedKey = $this->applyCmsPrefix($key);

            if (parent::has($prefixedKey, $locale, $fallback)) {
                $key = $prefixedKey;
            }
        }

        return parent::get($key, $replace, $locale, $fallback);
    }
207332
protected function getCustomMessageFromTranslator($key)
    {
        if (($message = $this->translator->trans($key)) !== $key) {
            return $message;
        }

        // If an exact match was not found for the key, we will collapse all of these
        // messages and loop through them and try to find a wildcard match for the
        // given key. Otherwise, we will simply return the key's value back out.
        $shortKey = preg_replace(
            '/^validation\.custom\./', '', $key
        );

        return $this->getWildcardCustomMessages(Arr::dot(
            (array) $this->translator->trans('validation.custom')
        ), $shortKey, $key);
    }
344455
public function get($key, array $replace = [])
    {
        return $this->translator->get($this->composeKey($key), $replace, $this->locale);
    }
161629
public function translate($key, $translation, $locale = null) {
        $locale = $this->locale($locale);

        return Lang::get($key, null, $locale);
    }
924205
public static function get($key)
    {
        exception_if(!array_has(self::$words, $key), LanguageKeyNotFoundException::class, $key);

        return array_get(self::$words, $key);
    }
545707
private function translate($key, $translations)
    {
        if (!is_null($translations) && isset($translations[$key])) {
            return $translations[$key];
        }

        return $key;
    }
826731
public String getMessage(String key, Locale locale)
	{
		if (null == locale)
		{
			return getMessage(key);
		}
		return CollectionTools.getString(getResourceBundle(locale), key, getBehaviourOnMissingMessage().getValueOnMissingMessage(key));
	}
1262858
public function translate(string $key) {
        if (!$this->supports($key)) {
            return $key;
        }

        return $this->translations[$key];
    }
456118
protected function getPageLocalizationByRequestKey($key)
	{
		$localization = $this->searchLocalizationByRequestKey($key);

		if ($localization === null) {

			$page = $this->searchPageByRequestKey($key);

			if ($page !== null) {
				return $page->getLocalization($this->getCurrentLocale()->getId());
			}
		}

		return $localization;
	}
684381
public function getValue($key){
		$this->loadCurrent();
		
		return $this->translator->getValue($this->current, $this->document, $key);
	}
365096
protected function getText($key)
    {
        return isset($this->texts[$key]) ? $this->texts[$key] : GetOpt::translate($key);
    }
403422
protected function getTranslation(string $key, string $locale)
    {
        return $this->translations()
            ->where('key', $key)
            ->where('locale', $locale)
            ->value('translation');
    }
1281820
private function translate($key, $locale = null)
    {
        if (is_null($locale))
            $locale = $this->translator->getLocale();

        $translation = $this->translator->trans($key, [], $locale);

        // @codeCoverageIgnoreStart
        if ( ! is_string($translation))
            throw new InvalidTranslationException(
                "The translation key [{$key}] for locale [{$locale}] should return a string value."
            );
        // @codeCoverageIgnoreEnd

        return (string) $translation;
    }
1281113
def translate_key(jsonkey):
  ""
  nombre,pkey,field=ujson.loads(jsonkey)
  return FieldKey(nombre,tuple(pkey),field)
142366
public static function get($key, $params = array()) {
        if (static::$message === NULL) {
            static::setLanguage('en');
        }

        $rs = isset(static::$message[$key]) ? static::$message[$key] : $key;

        $names = array_keys($params);
        $names = array_map(array('\\PhalApi\\Translator', 'formatVar'), $names);

        return str_replace($names, array_values($params), $rs);
    }
697356
public function getTranslation(
        string $language,
        string $key
    ) : Translation {
        $languages = $this
            ->repositoryCollection
            ->getTranslations(
                [],
                [$language],
                function (Translation $translation) use ($key) {
                    return $translation->getKey() === $key;
                }
            );

        $firstLanguage = reset($languages);

        return $firstLanguage;
    }
87206
public function translate($key, $data = null)
    {
        $rs = isset($this->data[$key]) ? $this->data[$key] : $key;
        if ($rs && !empty($data)) {
            $names = array_keys($data);
            $names = array_map(function($pkey){ return '{' . $pkey . '}'; }, $names);
            $rs = str_replace($names, array_values($data), $rs);
        }
        return $rs;
    }