Support » Plugin: Translate WordPress - Google Language Translator » the TITLE tag of the image still shows the default language name

  • Resolved Suki

    (@sukinoz)


    Hello,

    Even if I change the flag label in the shorcode,

    [glt language="French" label="FRANÇAIS" image="yes" text="yes" image_size="24"]

    the TITLE tag of the image still shows the default language name when the mouse is hovered over it to change the language.

    <a href="#" class="nturl notranslate fr French single-language flag" title="FRENCH" data-lang="French"><span class="flag size24"></span>Français</a>

    How can I change or hide that?

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

    (@edo888)

    Hi,

    You can possibly modify wp-content/plugins/google-language-translator/google-language-translator.php file and remove title= attribute from the language link.

    Thanks! 🙂

    Thread Starter Suki

    (@sukinoz)

    Thanks, but this solution is not valid.

    If you remove the “title” attribute, the url of the image is not generated.

    Plugin Author edo888

    (@edo888)

    In that case try to change title= to data-title= and then also make sure to modify wp-content/plugins/google-language-translator/js/scripts.js file and change title to data-title, should do the trick.

    Thanks! 🙂

    Thread Starter Suki

    (@sukinoz)

    maybe I’ve done something wrong, but it doesn’t work for me.

    Plugin Author edo888

    (@edo888)

    Hi,

    I cannot comment or suggest anything better.

    If you use our paid version we can customize the selector for you: https://gtranslate.io/#pricing

    Thanks! 🙂

    Thread Starter Suki

    (@sukinoz)

    1. /wp-content/plugins/google-language-translator/google-language-translator.php

     $this->languages_array = array (
          ...
          'fr' => 'FRANÇAIS',
          ...

    2. /wp-content/plugins/google-language-translator/css/style.css

    #flags.size16 a[title="FRANÇAIS"],
    #language .switcher .selected a[title="FRANÇAIS"] span,
    #language .switcher .option a[title="FRANÇAIS"] span,
    .tool-container .tool-items a[title="FRANÇAIS"],
    a.single-language[title="FRANÇAIS"] span.size16 {
        background: url('../images/flags16.png') -120px -92px no-repeat;
    }

    3.shortcode
    [glt language="FRANÇAIS" label="FRANÇAIS" image="yes" text="yes" image_size="16"]

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘the TITLE tag of the image still shows the default language name’ is closed to new replies.