[Skip to main content](#vessel-content)

#   ReCaptcha Errors Not Translated

##

- **[Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")**
- [![Ed&#95;Hika's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile") Topic Author
- [ Offline](/forum/user/33922-ed-hika)

Less More

- Posts: 109
- Thank you received: 5
-
-

11 years 11 months ago [\#181406](#181406) by [Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")  *[ReCaptcha Errors Not Translated](/forum/10-translation/873291-recaptcha-errors-not-translated#181406 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, there.  Good afternoon!  The error messages in the Hikashop ReCaptcha plugin (  www.hikashop.com/support/documentation/7...-with-recaptcha.html ) does not translate into other languages.  I have changed the code to make to use translation strings.  Here are the changes, if they are useful (and correct):  1) Changes in the &#95;checkCaptcha() function in recaptcha.php if (!$resp-&gt;is&#95;valid) { switch($resp-&gt;error){ default: $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;UNKNOWN'); break; case 'invalid-site-public-key': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDPUBLICKEY'); break; case 'invalid-site-private-key': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDPRIVATEKEY'); break; case 'invalid-request-cookie': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDREQUESTCOOKIE'); break; case 'incorrect-captcha-sol': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INCORRECTSOLUTION'); break; case 'verify-params-incorrect': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INCORRECTPARAMETERS'); break; case 'invalid-referrer': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDREFERRER'); break; case 'recaptcha-not-reachable': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;UNREACHABLERECAPTCHA'); break; }  2) Language File Added the following strings. CAPTCHA&#95;ERROR&#95;UNKNOWN=&quot;Anti-bot Validation - Unknown error&quot; CAPTCHA&#95;ERROR&#95;INVALIDPUBLICKEY=&quot;ReCaptcha couldn't verify the public key&quot; CAPTCHA&#95;ERROR&#95;INVALIDPRIVATEKEY=&quot;ReCaptcha couldn't verify the private key&quot; CAPTCHA&#95;ERROR&#95;INVALIDREQUESTCOOKIE=&quot;The challenge parameter of the verify script was incorrect&quot; CAPTCHA&#95;ERROR&#95;INCORRECTSOLUTION=&quot;The CAPTCHA solution was incorrect&quot; CAPTCHA&#95;ERROR&#95;INCORRECTPARAMETERS=&quot;The parameters were incorrect, make sure you are passing all the required parameters&quot; CAPTCHA&#95;ERROR&#95;INVALIDREFERRER=&quot;Invalid referer, reCAPTCHA API keys are tied to a specific domain name for security reasons&quot; CAPTCHA&#95;ERROR&#95;UNREACHABLERECAPTCHA=&quot;We couldn't contact the reCAPTCHA server to verify your answer. Please try again.&quot;  Note that only the 'incorrect-captcha-sol' case has been tested.  Hope this helps.  Take care!")* was created by *[Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6

Hello, there.

Good afternoon!

The error messages in the Hikashop ReCaptcha plugin ([ www.hikashop.com/support/documentation/7...-with-recaptcha.html](http://www.hikashop.com/support/documentation/72-hikashop-integration-with-recaptcha.html)) does not translate into other languages.

I have changed the code to make to use translation strings.

Here are the changes, if they are useful (and correct):

1) Changes in the _checkCaptcha() function in recaptcha.php
if (!$resp-&gt;is_valid) {
switch($resp-&gt;error){
default:
$resp-&gt;error = JText::_('CAPTCHA_ERROR_UNKNOWN');
break;
case 'invalid-site-public-key':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_INVALIDPUBLICKEY');
break;
case 'invalid-site-private-key':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_INVALIDPRIVATEKEY');
break;
case 'invalid-request-cookie':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_INVALIDREQUESTCOOKIE');
break;
case 'incorrect-captcha-sol':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_INCORRECTSOLUTION');
break;
case 'verify-params-incorrect':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_INCORRECTPARAMETERS');
break;
case 'invalid-referrer':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_INVALIDREFERRER');
break;
case 'recaptcha-not-reachable':
$resp-&gt;error = JText::_('CAPTCHA_ERROR_UNREACHABLERECAPTCHA');
break;
}

2) Language File
Added the following strings.
CAPTCHA_ERROR_UNKNOWN="Anti-bot Validation - Unknown error"
CAPTCHA_ERROR_INVALIDPUBLICKEY="ReCaptcha couldn't verify the public key"
CAPTCHA_ERROR_INVALIDPRIVATEKEY="ReCaptcha couldn't verify the private key"
CAPTCHA_ERROR_INVALIDREQUESTCOOKIE="The challenge parameter of the verify script was incorrect"
CAPTCHA_ERROR_INCORRECTSOLUTION="The CAPTCHA solution was incorrect"
CAPTCHA_ERROR_INCORRECTPARAMETERS="The parameters were incorrect, make sure you are passing all the required parameters"
CAPTCHA_ERROR_INVALIDREFERRER="Invalid referer, reCAPTCHA API keys are tied to a specific domain name for security reasons"
CAPTCHA_ERROR_UNREACHABLERECAPTCHA="We couldn't contact the reCAPTCHA server to verify your answer. Please try again."

Note that only the 'incorrect-captcha-sol' case has been tested.

Hope this helps.

Take care!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzg3MzI5MS1yZWNhcHRjaGEtZXJyb3JzLW5vdC10cmFuc2xhdGVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

11 years 11 months ago [\#181670](#181670) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[ReCaptcha Errors Not Translated](/forum/10-translation/873291-recaptcha-errors-not-translated#181670 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, there.  Good afternoon!  The error messages in the Hikashop ReCaptcha plugin (  www.hikashop.com/support/documentation/7...-with-recaptcha.html ) does not translate into other languages.  I have changed the code to make to use translation strings.  Here are the changes, if they are useful (and correct):  1) Changes in the &#95;checkCaptcha() function in recaptcha.php if (!$resp-&gt;is&#95;valid) { switch($resp-&gt;error){ default: $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;UNKNOWN'); break; case 'invalid-site-public-key': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDPUBLICKEY'); break; case 'invalid-site-private-key': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDPRIVATEKEY'); break; case 'invalid-request-cookie': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDREQUESTCOOKIE'); break; case 'incorrect-captcha-sol': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INCORRECTSOLUTION'); break; case 'verify-params-incorrect': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INCORRECTPARAMETERS'); break; case 'invalid-referrer': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;INVALIDREFERRER'); break; case 'recaptcha-not-reachable': $resp-&gt;error = JText::&#95;('CAPTCHA&#95;ERROR&#95;UNREACHABLERECAPTCHA'); break; }  2) Language File Added the following strings. CAPTCHA&#95;ERROR&#95;UNKNOWN=&quot;Anti-bot Validation - Unknown error&quot; CAPTCHA&#95;ERROR&#95;INVALIDPUBLICKEY=&quot;ReCaptcha couldn't verify the public key&quot; CAPTCHA&#95;ERROR&#95;INVALIDPRIVATEKEY=&quot;ReCaptcha couldn't verify the private key&quot; CAPTCHA&#95;ERROR&#95;INVALIDREQUESTCOOKIE=&quot;The challenge parameter of the verify script was incorrect&quot; CAPTCHA&#95;ERROR&#95;INCORRECTSOLUTION=&quot;The CAPTCHA solution was incorrect&quot; CAPTCHA&#95;ERROR&#95;INCORRECTPARAMETERS=&quot;The parameters were incorrect, make sure you are passing all the required parameters&quot; CAPTCHA&#95;ERROR&#95;INVALIDREFERRER=&quot;Invalid referer, reCAPTCHA API keys are tied to a specific domain name for security reasons&quot; CAPTCHA&#95;ERROR&#95;UNREACHABLERECAPTCHA=&quot;We couldn't contact the reCAPTCHA server to verify your answer. Please try again.&quot;  Note that only the 'incorrect-captcha-sol' case has been tested.  Hope this helps.  Take care!")*

Hi,

Thank you ! We've updated the plugin with the translations.

The following user(s) said Thank You: [Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzEwLXRyYW5zbGF0aW9uLzg3MzI5MS1yZWNhcHRjaGEtZXJyb3JzLW5vdC10cmFuc2xhdGVkP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
