Hi,
I’m also struggling with the language bit. I have noticed that the
explaining text on the image changes depending on from what country
the reCaptcha is called, i.e. when called from a Cypriot IP address
the text displays in Greek, and when called from a UK IP address the
text displays in English. That is very smart and nice, but I want the
text to always display in English irrespective of what country you’re
calling the reCaptcha from.
Dirtside, you sound like you know your way around code, so can you, or
anybody else, please tell me if there is anywhere in the following
code that I can insert the language switch?
/**
* Gets the challenge HTML (javascript and non-javascript version).
* This is called from the browser, and the resulting reCAPTCHA HTML
widget
* is embedded within the HTML form it was called from.
* @param string $pubkey A public key for reCAPTCHA
* @param string $error The error given by reCAPTCHA (optional,
default is null)
* @param boolean $use_ssl Should the request be made over ssl?
(optional, default is false)
* @return string - The HTML to be embedded in the user's form.
*/
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
if ($pubkey == null || $pubkey == '') {
return
'<div>'.JText::_('COM_PHOCAGUESTBOOK_RECAPTCHA_ERROR_GET_API').
'<br /> <a href=\'
https://www.google.com/recaptcha/admin/create
\'>
https://www.google.com/recaptcha/admin/create</a></div>';
}
if ($use_ssl) {
$server = RECAPTCHA_API_SECURE_SERVER;
} else {
$server = RECAPTCHA_API_SERVER;
}
$errorpart = "";
if ($error) {
$errorpart = "&error=" . $error;
}
return '<script type="text/javascript" src="'. $server . '/
challenge?k=' . $pubkey . $errorpart . '"></script>
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart .
'" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></
textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge"/>
</noscript>';
}
I’m using the reCaptcha with PhocaGuestbook on Joomla.
Hopefull regards / Gloria