• Resolved geronimo108

    (@geronimo108)


    Hello,
    I need help to select the currently language use by the navigator and to display it automaticaly in bold instead of “select language”. How can I do that ?

    Also, I have an issue with the location of the selector. I have selected the option to display it in my main menu but it is displaying in my main menu but also in my secondary menu. I have correctly set the settings in Apparance / Menus. I have built my website with Divi.

    Thank you in advance for your help !

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    You can check https://www.ads-software.com/support/topic/navigate-to-another-page-disable-the-selected-language/, which has some basic code which you can adapt for your needs.

    If you want us to position the language selector on your website, please feel free to contact our live chat: https://gtranslate.io/#contact

    Thanks! ??

    Thread Starter geronimo108

    (@geronimo108)

    Hello !

    Thanks for your reply !! ??

    I tried to insert this code in my body but it doesn’t work…

    <script>
    jQuery( document ).ready(function() {
    var main_language = 'fr';
    var current_language = document.getElementsByTagName('html')[0].getAttribute('lang');
    // change dropdown language
    var my_selectors = document.querySelectorAll('#gtranslate_selector [value="fr|'+current_language+'"]');
    my_selectors[0].selected = true;
    });
    </script>

    I just want to have one selector on each page ??

    Thanks in advance !

    Plugin Author edo888

    (@edo888)

    Hi,

    Try to set some timeout like this:

    
    setTimeout(function() {your code here}, 2000);
    

    Thanks! ??

    Thread Starter geronimo108

    (@geronimo108)

    Great ! It’s working absolutly fine !

    I have also an issue with Gtranslate. I want to have my language selector just in my navbar. But it appears in my secoundary menu as well. In Gtranslate, I have selected “show in my primary menu”. I checked in my wordpress settings, apparance / menus and I have just my navbar in “Primary menu”. How can I fix this ?

    Plugin Author edo888

    (@edo888)

    Hi,

    Please contact our live chat and we will help you: https://gtranslate.io/#contact

    Thanks! ??

    Thread Starter geronimo108

    (@geronimo108)

    Hey edo888 !

    I have made your adjustement and it’s working absolutly fine ! But my client says that it doen’t work for him… He is ussing Microsoft Edge. Maybe doas he need to clear his navigator’s cache ? Or this code doesn’t work well with this navigator ?

    what is you opinion ?

    Thank you ! ??

    Thread Starter geronimo108

    (@geronimo108)

    Problem solved ! He have to clear his navigator’s cache ! ??

    Plugin Author edo888

    (@edo888)

    Thanks! ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Main menu & select current language’ is closed to new replies.