mirror of
https://github.com/shadoll/sLetter.git
synced 2025-12-20 03:27:00 +00:00
lng fix
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* @author sHa <sha@shadoll.com>
|
* @author sHa <sha@shadoll.com>
|
||||||
* @package sLetter
|
* @package sLetter
|
||||||
* @version 18.2.13-9
|
* @version 18.2.13-10
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -34,11 +34,16 @@ class sLetter{
|
|||||||
private $logoUri = "";
|
private $logoUri = "";
|
||||||
|
|
||||||
function __construct(){
|
function __construct(){
|
||||||
$this->setLang(require_once(__DIR__."/lng/".$this->language.".php"));
|
|
||||||
if($this->senderDetect)
|
if($this->senderDetect)
|
||||||
$this->detect();
|
$this->detect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadLanguage($return=false){
|
||||||
|
$this->setLang(require_once(__DIR__."/lng/".$this->language.".php"));
|
||||||
|
|
||||||
|
return $return?$this->lang:$this;
|
||||||
|
}
|
||||||
|
|
||||||
function setData($data,$return=false){
|
function setData($data,$return=false){
|
||||||
if(empty($data) || !is_array($data))
|
if(empty($data) || !is_array($data))
|
||||||
return $return?$this->fields:$this;
|
return $return?$this->fields:$this;
|
||||||
@@ -54,6 +59,9 @@ class sLetter{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setLang($data,$return=false){
|
function setLang($data,$return=false){
|
||||||
|
if(empty($this->lang))
|
||||||
|
$this->loadLanguage();
|
||||||
|
|
||||||
if(empty($data) || !is_array($data))
|
if(empty($data) || !is_array($data))
|
||||||
return $return?$this->lang:$this;
|
return $return?$this->lang:$this;
|
||||||
|
|
||||||
@@ -91,6 +99,9 @@ class sLetter{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function message($return=false){
|
function message($return=false){
|
||||||
|
if(empty($this->lang))
|
||||||
|
$this->loadLanguage();
|
||||||
|
|
||||||
$this->message .= "<html><body style='font-family:Arial,sans-serif;'>";
|
$this->message .= "<html><body style='font-family:Arial,sans-serif;'>";
|
||||||
|
|
||||||
if(!empty($this->logoUri))
|
if(!empty($this->logoUri))
|
||||||
|
|||||||
Reference in New Issue
Block a user