public function testAddMessage()
 {
     PhalApi_Translator::setLanguage('zh_cn');
     PhalApi_Translator::addMessage(dirname(__FILE__) . '/Data');
     $this->assertEquals('this is a good way', PhalApi_Translator::get('test'));
 }
Beispiel #2
0
/**
 * 快速翻译
 * @param string $msg 待翻译的内容
 * @param array $params 动态参数
 */
function T($msg, $params = array())
{
    return PhalApi_Translator::get($msg, $params);
}