|
OpenSencillo
2015.002
|
Inheritance diagram for translate:
Collaboration diagram for translate:Public Member Functions | |
| __construct ($name, $lang) | |
| translate ($tKey) | |
| addTranslate ($tKey, $tData) | |
Protected Attributes | |
| $tSource | |
| $lang | |
Definition at line 8 of file translate.tool.framework.php.
| __construct | ( | $ | name, |
| $ | lang | ||
| ) |
Definition at line 13 of file translate.tool.framework.php.
| addTranslate | ( | $ | tKey, |
| $ | tData | ||
| ) | [final] |
Definition at line 41 of file translate.tool.framework.php.
{
if((is_string($tKey))&&(is_array($tData)))
{
$this->tSource[$tKey]=$tData;
$this->write(json_encode($this->tSource));
return true;
}
else
{
return false;
}
}
| translate | ( | $ | tKey | ) | [final] |
Find translate by key
| string | $tKey |
Definition at line 29 of file translate.tool.framework.php.
{
return ($this->tSource[$tKey][$this->lang] ? $this->tSource[$tKey][$this->lang] : $tKey);
}
$lang [protected] |
Definition at line 11 of file translate.tool.framework.php.
$tSource [protected] |
Definition at line 10 of file translate.tool.framework.php.