Use Language of site

Permalink Browser Info Environment
Hello,

I use your plugins for my site. But in my website, I have two languages and the user can change language by a button.

So I had to modify your plugin's so that the captcha uses the language defined by the user.

Change to the "RecaptchaController.php" file.

Adding:
Use Concrete \ Core \ Localization \ Localization;

And on line 42 to 44, change to:
if ($lang !== 'auto') {
$assetUrl .= '&hl=' . $lang;
} else {
$assetUrl .= '&hl=' . Localization::activeLanguage();
}

Hello,
I use your plugins for my site. But in my website, I have two languages and the user can change language by a button.

So I had to modify your plugin's so that the captcha uses the language defined by the user.

Change to the "RecaptchaController.php" file

Adding:
Use Concrete \ Core \ Localization \ Localization;


And on line 42 to 44, change to:
If ($ lang! == 'auto') {
 $ AssetUrl. = '& Hl ='. $ Lang;
 } Else {
 $ AssetUrl. = '& Hl ='. Localization :: activeLanguage ();
 }


It would be best to add an option in the configuration in addition to the "auto" mode to indicate that one uses the language of the website

Best regards,

Guillaume A

Type: Pre-Sale
Status: New
View Replies:

concrete5 Environment Information

In front website

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.