• This plugin seems to work nicely, except for two things:

    1) When I click a foreign flag to translate a page, it doesn’t switch back to English when I click the U.S. flag. I have to click “Original version”.

    2) The site would look better and would make more sense if it just showed the currently active flag/language. Most people know that the flag indicates language version. Having this yellow box saying “Translate” in English doesn’t make much sense, since people who don’t speak English won’t know what it says. Is there a way to get rid of the yellow box and just display the current flag?

    https://www.ads-software.com/plugins/google-language-translator/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I want to figure out a way that an image can be displayed instead of ‘Translate’ when it comes to editing load-toolbar.js.

    jQuery(document).ready(function($) {
    $(‘#glt-translate-trigger’).toolbar({content: ‘#flags’, position: ‘top’, hideOnClick: ‘true’});

    $(‘#glt-translate-trigger’).on(‘toolbarShown’,function(event) {
    $(‘.tool-rounded’).css(‘display’,’block’);
    $(‘.tool-rounded’).css(‘position’,’fixed’);
    $(‘.tool-rounded’).css(‘bottom’,’50px’);
    $(‘.tool-rounded’).css(‘top’,’auto !important’);
    $(‘#glt-translate-trigger span’).text(‘Translate ? ‘);
    });
    $(‘#glt-translate-trigger’).on(‘toolbarHidden’,function(event) {
    //$(‘#glt-translate-trigger span’).text(‘Translate ? ‘);
    $(‘.tool-rounded’).css(‘position’,’absolute’);
    });

    $(‘#glt-translate-trigger’).on(‘toolbarItemClick’,function(event) {
    $(‘#glt-translate-trigger span’).text(‘Translate ? ‘);
    $(this).removeClass(‘pressed’);
    $(‘.tool-container’).hide();
    });
    });

    How do I replace ‘Translate ? ‘ with a HTML image? I have tried this already. When the user selects it on the browser, it shows up as plain text, not an image and when I change the code from .text to .image, it works but when the flags appear and are clicked, they don’t work or translate the webpage.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can we get rid of yellow "Translate" box & just have active flag?’ is closed to new replies.