/** * 返回一个翻译字符串结构 * * @param string $token 传递给之类的解析 */ protected function getTokenString($token) { if (isset($this->data[$this->locale][$token])) { return parent::translate($this->data[$this->locale][$token]); } else { return $token; } }
/** * 返回一个翻译字符串结构 * * @param string $token 传递给之类的解析 */ protected function getTokenString($token) { //无配对时,返回的是array if ($this->iniDriver[$this->locale]->getByKey($token) !== array()) { return parent::translate($this->iniDriver[$this->locale]->getByKey($token)); } else { return $token; } }