Get an error message in the current language.
@access protected
@param string $key
@return string
966184
protected function lang($key)
    {
        if (count($this->language) < 1) {
            $this->setLanguage('en'); // set the default language
        }

        if (isset($this->language[$key])) {
            return $this->language[$key];
        } else {
            return 'Language string failed to load: ' . $key;
        }
    }
924205
public static function get($key)
    {
        exception_if(!array_has(self::$words, $key), LanguageKeyNotFoundException::class, $key);

        return array_get(self::$words, $key);
    }
1215679
public function getErrorMessage($error)
    {
        $jsonResponse = json_decode($error->getResponse()->getBody(), true);
        $errorMessage = $error->getMessage();

        if (count($jsonResponse['errors']) > 0) {
            $errorMessage = $jsonResponse['errors'][0]['message'];
        }

        return $errorMessage;
    }
365096
protected function getText($key)
    {
        return isset($this->texts[$key]) ? $this->texts[$key] : GetOpt::translate($key);
    }
285276
public function get($key)
    {
        if ($this->has($key)) {
            $flashMessages = $this->storage->get(self::FLASH_KEY);
            $message = $flashMessages[$key];

            $this->remove($key);

            if ($this->translator instanceof TranslatorInterface) {
                $message = $this->translator->translate($message);
            }

            return $message;
        } else {
            throw new RuntimeException(sprintf(
                'Attempted to read non-existing key %s', $key
            ));
        }
    }
759756
public function getTranslations($key = null)
    {
        if ($key !== null) {
            $this->guardAgainstNonTranslatableAttribute($key);

            return array_filter(json_decode($this->getAttributeFromArray($key) ?? '' ?: '{}', true) ?: [], function ($value) {
                return $value !== null && $value !== false && $value !== '';
            });
        }

        return array_reduce($this->getTranslatableAttributes(), function ($result, $item) {
            $result[$item] = $this->getTranslations($item);

            return $result;
        });
    }
341727
protected static function getErrorMessage($code)
    {
        $string = socket_strerror($code);

        // search constant starting with SOCKET_ for this error code
        foreach (get_defined_constants() as $key => $value) {
            if($value === $code && strpos($key, 'SOCKET_') === 0) {
                $string .= ' (' . $key . ')';
                break;
            }
        }

        return $string;
    }
837610
public function getNameByKey($key)
    {
        return (array_key_exists($key, $this->_languages)) ? $this->_languages[$key] : null;
    }
558643
public function get(string $key)
    {
        if (array_key_exists($key, $this->get)) {
            return $this->get[$key];
        }

        return '';
    }
1320071
public function getError($key = null)
    {
        if (isset($key)) {
            return gplcart_array_get($this->errors, $key);
        }

        return $this->errors;
    }
823096
public static function getMessageFor($code)
    {
        if (isset(self::$errorMessages[$code])) {
            $message = self::$errorMessages[$code];
        } else {
            $message = 'Unknown error code: "' . $code . '"';
        }

        return $message;
    }
183220
public function getParam(String $key) {

		return $this->params[$key] ?? $this->httpErrors[$key] ?? null;

	}
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;
    }
937642
protected function lang($key)
    {
        if (count($this->language) < 1) {
            $this->setLanguage('en'); // set the default language
        }

        if (array_key_exists($key, $this->language)) {
            if ('smtp_connect_failed' == $key) {
                //Include a link to troubleshooting docs on SMTP connection failure
                //this is by far the biggest cause of support questions
                //but it's usually not PHPMailer's fault.
                return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
            }

            return $this->language[$key];
        }

        //Return the key as a fallback
        return $key;
    }
520839
public function checkLanguage(string $key): bool
    {
        $locale = $this->getOption('locale', []);

        if (array_key_exists($key, Arr::wrap($locale))) {
            return filter_var($locale[$key], FILTER_VALIDATE_BOOLEAN);
        }

        return false;
    }
686618
public function getstr($key, $params=[], $alternative=null, $lang=null){

        if (!$lang) {
            $lang = $this->locale;
        }

        if (!$alternative){
            $alternative = $key;
        }

        return \vsprintf(isset($this->_languages[$lang][$key]) ? $this->_languages[$lang][$key]:$alternative, $params);
    }
247948
public function getMessage($key) {
		if (isset($this->msg[$key])) {
			return $this->msg[$key];
		} else {
			return null;
		}
	}