ZF-12086: Zend_Captcha_ReCaptcha should support custom_translations option


Feature which allows translate all recaptcha elements is described on… . But following code do not set custom_translation option: $captchaEngine = new Zend_Captcha_ReCaptcha(); $captchaEngine->setPubkey($config->recaptcha->public_key); $captchaEngine->setPrivkey($config->recaptcha->private_key); $captchaEngine->setOption('theme', 'white');

    $customTranslations = '{instructions_visual : \'Wpisz dwa wyrazy:\', instructions_audio: \'Wpisz usłyszany tekst:\'}';

    $captchaEngine->setOption('custom_translations', $customTranslations);


patch for ZF-12086: adding custom_translations option to Zend_Service_ReCaptcha.

I think that I found better solution. Zend_Captcha_ReCaptcha should have "IsCustomTranslated" property. If user call "setCustomTranslated(true)" rendering should use translation engine to translate all 9 phrases and set "custom_translation" to right value.h

I believe the proposed patch offers a more flexible solution; relying on a translating engine would lead to nondeterministic results if the translation engine is updated, what is probably undesirable.

Fixed on trunk (25295) and on release-1.12 branch (25296)

Thanks to Christian!