PHPMailer\PHPMailer\PHPMailer::lang PHP Метод

lang() защищенный метод

Get an error message in the current language.
protected lang ( string $key ) : string
$key string
Результат string
    protected function lang($key)
        if (count($this->language) < 1) {
            // 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] . '';
            return $this->language[$key];
        } else {
            //Return the key as a fallback
            return $key;