Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1306096

    Hi,

    I have an enfold website that is translated in Flemish (nl_BE) by WPML. Everything works fine, except for the Google ReCaptcha (V2) which is displayed in Russian.

    When selecting the default language of the website (Dutch) it works fine and it shows the captcha in Dutch.

    Do you know what causes this problem and how to fix this?

    The website uses the latest versions of WPML, WordPress and Enfold

    #1306669

    Hey Paul,

    Thank you for the inquiry.

    Looks like Flemish is not available for recaptcha, or the API does not have this translation yet.

    // https://developers.google.com/recaptcha/docs/language

    To fix the issue, we might have to set the hl parameter manually in the enfold/framework/js/conditional_load/avia_google_recaptcha_api.js around line 210.

    	switch( this.version )
    			{
    				case 'avia_recaptcha_v2':
    					src += '?onload=av_recaptcha_main_api_loaded&render=explicit';
    					break;
    				case 'avia_recaptcha_v3':
    					src += '?onload=av_recaptcha_main_api_loaded&render=' + this.site_key3;
    					break;
    			}
    

    Replace the code with:

    	var lang = document.getElementsByTagName("html")[0].getAttribute("lang").replace("-", "_");
    
    			switch( this.version )
    			{
    				case 'avia_recaptcha_v2':
    					src += '?onload=av_recaptcha_main_api_loaded&render=explicit&hl=' + lang;
    					break;
    				case 'avia_recaptcha_v3':
    					src += '?onload=av_recaptcha_main_api_loaded&render=' + this.site_key3 + '&hl=' + lang;
    					break;
    			}
    

    Best regards,
    Ismael

    #1307172

    Dear Ismael,

    Thank you for your reply. I have implemented this on my website, but unfortunately, this does not seem to change anything in the frontend.

    Kind regards,

    Paul

    #1307403

    Hi,

    Thank you for the update.

    Did you disable the Performance > File Compression settings after doing the modification? Please post the login details in the private field so that we can check the site. Make sure that the Appearance > Editor panel is accessible.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.