1

How do you update language for recaptcha.

I've tried with this options (like in the example) : lang : 'fr'

But it's not working.

Thanks.

  • I can confirm that on CiviCRM 4.6.24. – Martin Peth Apr 11 '17 at 6:01
  • Any new action on this - I can't get it to show e.g. a German version. – Abteilung Gerontopsychiatrie Jul 1 '17 at 22:25
1

The library in use in civicrm is not language aware. Here's a patch that is working for me on 5.27:

diff --git a/packages/recaptcha/recaptchalib.php b/packages/recaptcha/recaptchalib.php
index 78d2b14..c869a09 100644
--- a/packages/recaptcha/recaptchalib.php
+++ b/packages/recaptcha/recaptchalib.php
@@ -114,7 +114,8 @@ function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
         } else {
                 $server = RECAPTCHA_API_SERVER;
         }
-
+        $locale = CRM_Core_I18n::getLocale();
+        $server = $server .'?hl='.$locale;
         $errorpart = "";
         if ($error) {
            $errorpart = "&error=" . $error;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.