• Resolved Yuri Gracida

    (@ygracida)


    I setup GTranslate long time ago, today one of my colleages told me it’s not working, and actually is not.

    Please help

    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 and I see the following code in the HTML source code: $('.gtranslate_wrapper').remove();

    Not sure why it is there, please remove it.

    Thanks! 🙂

    Thread Starter Yuri Gracida

    (@ygracida)

    Hello

    $(‘.gtranslate_wrapper’).remove(); was removed, it was created for an specific page that we don’t use anymore.

    Still after removing, is not translating. 🙁

    Plugin Author edo888

    (@edo888)

    Hi,

    You have the following inline javascript code:

    jQuery(document).ready(function($) {
        if ($('#theID').val() === '748') {
            console.log('Change testimonial names - clients');
            document.body.innerHTML = document.body.innerHTML.replace('- John Romer', 'John Romer<br />Su puesto');
            document.body.innerHTML = document.body.innerHTML.replace('- Santiago Doe', 'Santiago Doe<br />Su puesto')
        }
        ...

    It is resetting the entire body HTML which is removing javascript events attached to the language switcher.

    Thanks! 🙂

    Thread Starter Yuri Gracida

    (@ygracida)

    I see what you mean

    So we have a problem, we have some codes to change/update information on each page by executing “document.body.innerHTML = document.body.innerHTML.replace”

    So, how can we add again javascript events attached to language switcher ? there should be an option.

    Plugin Author edo888

    (@edo888)

    Hi,

    It will be a hard task to get everything right. I would recommend to narrow down your search inside specific tags instead of the whole body, so when you change it, it doesn’t affect other areas. Or possibly search only inside text nodes and change specific text nodes instead.

    Please consult your developer.

    Thanks! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Translator Not Working’ is closed to new replies.