*

7ala

  • ****
  • 144 posts
Automatic change of language problem recaptcha
« on: January 31, 2022, 08:55:21 AM »
Hello,

Use this code
Code: [Select]
<?php if (osc_current_user_locale()=='en_US') {?>
        <script src="https://www.google.com/recaptcha/api.js?hl=en" async></script>
        <?php ?>
<?php if (osc_current_user_locale()=='ru_RU') {?>
        <script src="https://www.google.com/recaptcha/api.js?hl=ru" async></script>
        <?php ?>
but the problem is
The language is not automatically changed unless it works
Refresh the page again  :'(
« Last Edit: January 31, 2022, 09:30:31 AM by 7ala »

*

MB Themes

Re: Automatic change of language problem recaptcha
« Reply #1 on: January 31, 2022, 09:29:54 AM »
I would recommend to put dunction on language code only, not to condition it.
Unfortunately do not understand your issue.
You change language in osclass but language of recaptcha is not changed?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

7ala

  • ****
  • 144 posts
Re: Automatic change of language problem recaptcha
« Reply #2 on: January 31, 2022, 09:37:12 AM »
If the site is multilingual
When entering the registration page for the first time,
recaptcha is in English
When changing the language to Russian
Recaptcha language does not change to Russian
It is still in the English language
If you refresh the page again, the recaptcha language changes to Russian
The problem is why the recaptcha language is not automatically changed when the page is opened for the first time
According to the selected language
Thank you for your kindness and quick response

*

MB Themes

Re: Automatic change of language problem recaptcha
« Reply #3 on: January 31, 2022, 10:08:48 AM »
@7ala
Check if language of script has been changed (basically if osc_current_user_locale use new locale code).
If yes, problem is not with osclass.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots