• Resolved rashmisonimindtree

    (@rashmisonimindtree)


    Hello Team,

    I m using the free version of the plugin on the above mentioned website. Whenever i m navigating to one page to another after doing translation then on the other page unable to fetch which language i have selected. The Select Box is showing the Select language option and the page came is the translated one.

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

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

    (@edo888)

    Hi,

    I have checked your website and was able to change the language and navigate to other pages without issues.

    Please provide the steps to replicate the issue on my side, you may also contact our live chat: https://gtranslate.io/#contact

    You need to make sure that the language selector is available on all pages, so it can keep the selected language when navigating.

    Thanks! ??

    Thread Starter rashmisonimindtree

    (@rashmisonimindtree)

    Hi Team,

    Please find below steps to replicate the issue.
    1. On the home page select any language from the language selector at the top right corner.
    2. After changing navigate to another page.
    3. The page is translated but in which language it is translated is not shown in the language selector on the navigated page.

    Language selector need to show in which language the page is translated even after navigating to another page.

    Plugin Author edo888

    (@edo888)

    Hi,

    I can see that you have modified the dropdown code slightly and removed Select Language option and you also have 3 language selectors on each page (not sure why).

    To make sure the selected language matches the dropdown value, you need to run this javascript after page load:

    
    var main_language = 'en';
    var current_language = document.getElementsByTagName('html')[0].getAttribute('lang');
    // change dropdown language
    var my_selectors = document.querySelectorAll('#gtranslate_selector [value="en|'+current_language+'"]');
    my_selectors[0].selected = true;
    my_selectors[1].selected = true;
    my_selectors[2].selected = true;
    

    Hope this helps.

    Thanks! ??

    Thread Starter rashmisonimindtree

    (@rashmisonimindtree)

    Thanks for the update. It is working fine for me.

    Plugin Author edo888

    (@edo888)

    Thanks! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Navigate to another page disable the selected language’ is closed to new replies.