PHP phpmailer\phpmailer PHPMailer::setLanguage Examples

PHP phpmailer\phpmailer PHPMailer::setLanguage - 1 examples found. These are the top rated real world PHP examples of phpmailer\phpmailer\PHPMailer::setLanguage extracted from open source projects. You can rate examples to help us improve the quality of examples.

setLanguage() public method

Returns false if it cannot load the language file. The default language is English.
public setLanguage ( string $langcode = 'en', string $lang_path = '' ) : boolean
$langcode string ISO 639-1 2-character language code (e.g. French is "fr")
$lang_path string Path to the language file directory, with trailing separator (slash)
return boolean
Example #1
1
 /**
  *
  */
 private function config()
 {
     if (isset($this->config['lang']['local']) && isset($this->config['lang']['path'])) {
         $this->mail->setLanguage($this->config['lang']['local'], $this->config['lang']['path']);
     }
     $this->mail->CharSet = $this->config['charset'];
     switch ($this->config['transport']) {
         case 'smtp':
             $this->mail->isSMTP();
             if (isset($this->config['debug'])) {
                 $this->mail->SMTPDebug = $this->config['debug'];
                 $this->mail->Debugoutput = 'html';
             }
             $this->mail->Host = $this->config['host'];
             if (isset($this->config['user'])) {
                 $this->mail->SMTPAuth = true;
                 $this->mail->Username = $this->config['user'];
                 $this->mail->Password = $this->config['pass'];
                 $this->mail->Port = $this->config['port'];
                 if (isset($this->config['encrypt'])) {
                     $this->mail->SMTPSecure = $this->config['encrypt'];
                 }
             }
             break;
         case 'sendmail':
             $this->mail->isSendmail();
             $this->mail->Sendmail = $this->config['command'];
             break;
     }
 }