Allow reCAPTCHA in multiple languages, as available through Google's reCAPTCHA API & hl language codes

Today


reCAPTCHA on our English URL: I'm not a robot
reCAPTCHA on our Malay URL: I'm not a robot (wrong!)

The Malay version should read: "Saya bukan robot".

Why is it like that? Because Google's language-detection heuristics are very poor for reCAPTCHA. Instead of reinventing the wheel, Google simply lets API users override the language via a two-letter hl language code passed onto the reCAPTCHA api va a JS resource parameter.

The problem is that Webflow doesn't expose any way for us to set the reCAPTCHA hl language code even when we know what language is needed.

Huh, that's bad. What is Webflow's workaround?

Ask your users to change their brower's language, via the browser settings, and then restart their browser. 😔

Yes. That is the ONLY way to force the reCAPTCHA language to change today in Webflow. This is far too much to ask for users.

Many users install applications in the default English language, yet browse the web in their native language.

As an example, your browser is in English, but you can view Apple.com in Spanish. https://www.apple.com/mx/ You didn't to change your browser language.

What Webflow should change

Add, for us the web developer & designers, a small settings area in the reCAPTCHA element to set this element's hl language code. It would be acceptable to require combo or separate classes. Anything is better than what we have today.

A list of hl language codes are provided here: https://developers.google.com/recaptcha/docs/language

The result

reCAPTCHA on our English URL: I'm not a robot
reCAPTCHA on our Malay URL: Saya bukan robot (correct!)

Source: https://developers.google.com/recaptcha/docs/display#configuration
  • Tiada Guru
  • Mar 17 2020
  • Reviewed