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:
And on line 42 to 44, change to:
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
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 |