* @license PHP License * @package WB * @subpackage base */ WBClass::load('WBLog'); /** * Native Lanauge Support: Translator Service * * * @version 1.0.3 * @package WB * @subpackage nls */ class WBNLS_Translator_Service extends WBStdClass { /** * My Configuration Parameter * @var array */ protected $config = array(); /** * Source Language * @var string */ private $cLang = ''; /** * Target Language * @var string */ private $lang = ''; /** * Construtor * * @param array configation parameters */ public function __construct($parameter = array()) { } /** * Set Config Values * * * * @param array configuration options * @return bool true on success */ final public function configure($config) { $this->config = array_merge($this->config, $config); $this->init(); } /** * 2nd Construtor * * @see configure() */ protected function init() { } /** * Set Source Language Code * * @param string language code */ final public function setSourceLang($cLang) { $this->cLang = $cLang; } /** * Get Source Language Code * * @return string language code */ final protected function getSourceLang() { return $this->cLang; } /** * Set Target Language Code * * @param string language code */ final public function setTargetLang($lang) { $this->lang = $lang; } /** * Set Target Language Code * * @return string language code */ final protected function getTargetLang() { return $this->lang; } /** * Translate List of String * * Enrich list of messages with translations. Add array-key '_trans' * * @param array list of associative arrays * @param string key in associative array * @return bool true on success */ public function translateList(&$list, $key = 'msg') { return false; } }