我想强制ReCaptcha表单只在Zend中使用EN语言,但是这些代码对我不起作用:
$recaptcha = new Zend_Service_ReCaptcha($publickey, $privatekey);
$captcha = new Zend_Form_Element_Captcha('captcha',
array(
'captcha' => 'ReCaptcha',
'captchaOptions' => array('captcha' => 'ReCaptcha', 'service' => $recaptcha, 'lang'=>'en'),
'ignore' => true
)
);
$this->addElement($captcha);
有什么想法吗?
答案 0 :(得分:0)
我认为这应该有用(暂时无法测试,对不起)
$captcha = new Zend_Form_Element_Captcha('challenge', array(
'captcha' => 'ReCaptcha',
'captchaOptions' => array(
'captcha' => 'ReCaptcha',
'privKey' => ' ',
'pubKey' => ' '
)
));
$captcha->getCaptcha()->getService()
->setOption('theme', 'white')
->setOption('lang', 'en'); // should do it