• Resolved infmgt

    (@infmgt)


    If you take a look at the page I have linked to, you will see the translate widget at top left. When clicked, the widget disappears and the translation banner appears above the site. This is exactly where I would like it. Is there any way that the banner can be made to appear there immediately (i.e. without the widget ever appearing)?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Prisna

    (@prisna)

    Greetings,

    you should to go to:

    General > Display mode, select: Automatic

    This should display the banner automatically when the visitor’s browser language is different than the language set in:

    General > Website’s language

    Regards

    Thread Starter infmgt

    (@infmgt)

    Thanks for the reply. I’ve tried your suggestion with different browsers and got different results. The language of the WordPress site is set to English.

    Firefox: With the browser language set to French, everything is OK. I also tried it in Italian and that worked as well.

    Edge: Browser language was Italian: there was no banner but the widget appeared in Italian.

    Chrome: Browser language was Italian: there was no banner and the widget appeared in English.

    I’ve made a short video of screenshots of the results which you can see here:

    Any ideas?

    Best regards.

    Plugin Author Prisna

    (@prisna)

    Thanks for the explanations and the video.

    As you might not know, this plugin is a vehicle for people to easily integrate the Google Translation widget into their sites. The original widget is meant to be used in regular HTML websites.

    Unfortunatelly there’s nothing we can do about that, this is the way Google made the translation widget, and whether these different behaviors are intentional or not, only Google can modify the code of the widget, sorry. If you know how to check the files loaded when you access your site, you’ll see the widget’s files are loaded directly from Google servers.

    So if you’d like to have your site displaying the same translation options accross all browsers, you’ll have to roll back and select the Tabbed display mode.

    Regards

    Thread Starter infmgt

    (@infmgt)

    That’s a pity. Is there, perhaps, a way in which I could ‘fire’ the widget on page load so that the banner is immediately displayed as I would like?

    There was a request on here recently (Automatic Translation by rantaro) which looks similar to what I am trying to do. Rantaro wanted the page to be automatically translated; I would like things to stop halfway (so to speak).

    Best regards.

    Plugin Author Prisna

    (@prisna)

    You may try this, go to:

    Advanced > General > Javascript callbacks > On after load

    Use:

    var _run = function() {
    	setTimeout(function() { 
    		var iframe = document.getElementById(":0.container");
    		if (iframe)
    			iframe.contentWindow.document.getElementById(":0.translate").click();
    		else
    			_run();
    	}, 200);
    };
    _run();

    Then in:

    Advanced > General > Custom CSS

    Use:

    .goog-te-ftab-float {
    	display: none !important;
    }

    It’ll take a little while to display, but it should achieve what you’re looking for.

    Regards

    Thread Starter infmgt

    (@infmgt)

    Works brilliantly; thanks a lot.

    Best regards.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Immediate display of banner’ is closed to new replies.