• Resolved murnialay

    (@murnialay)


    hi,how i can move flag indonesian to the left.beside usa flag.
    flag

    here’s my code :

    <!-- GTranslate: https://gtranslate.io/ -->       
    <a href="#" onclick="doGTranslate('en|en');return false;" title="English" class="glink nturl notranslate"><img src="//abcd.com/wp-content/plugins/gtranslate/flags/16/en.png" height="16" width="16" alt="English"  style="vertical-align:middle;margin:0px 25px"/></a><a href="#" onclick="doGTranslate('en|id');return false;" title="Indonesian" class="glink nturl notranslate"><img src="//abcd.com/wp-content/plugins/gtranslate/flags/16/id.png" height="16" width="16" alt="Indonesian"  style="vertical-align:middle;margin:15px 25px"/></a><style>#goog-gt-tt{display:none!important;}.goog-te-banner-frame{display:none!important;}.goog-te-menu-value:hover{text-decoration:none!important;}.goog-text-highlight{background-color:transparent!important;box-shadow:none!important;}body{top:0!important;}#google_translate_element2{display:none!important;}</style>
    <div id="google_translate_element2"></div>
    <script>function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'en',autoDisplay: false}, 'google_translate_element2');}if(!window.gt_translate_script){window.gt_translate_script=document.createElement('script');gt_translate_script.src='https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2';document.body.appendChild(gt_translate_script);}</script>
    
    <script>
    function GTranslateGetCurrentLang() {var keyValue = document['cookie'].match('(^|;) ?googtrans=([^;]*)(;|$)');return keyValue ? keyValue[2].split('/')[2] : null;}
    function GTranslateFireEvent(element,event){try{if(document.createEventObject){var evt=document.createEventObject();element.fireEvent('on'+event,evt)}else{var evt=document.createEvent('HTMLEvents');evt.initEvent(event,true,true);element.dispatchEvent(evt)}}catch(e){}}
    function doGTranslate(lang_pair){if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(GTranslateGetCurrentLang() == null && lang == lang_pair.split('|')[0])return;if(typeof ga=='function'){ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}var teCombo;var sel=document.getElementsByTagName('select');for(var i=0;i<sel.length;i++)if(sel[i].className.indexOf('goog-te-combo')!=-1){teCombo=sel[i];break;}if(document.getElementById('google_translate_element2')==null||document.getElementById('google_translate_element2').innerHTML.length==0||teCombo.length==0||teCombo.innerHTML.length==0){setTimeout(function(){doGTranslate(lang_pair)},500)}else{teCombo.value=lang;GTranslateFireEvent(teCombo,'change');GTranslateFireEvent(teCombo,'change')}}
    </script>
    • This topic was modified 1 year, 11 months ago by murnialay.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    Please post your website address, so I can check.

    Thanks! 🙂

    Thread Starter murnialay

    (@murnialay)

    a3

    <!-- GTranslate: https://gtranslate.io/ -->       
    <a href="#" onclick="doGTranslate('en|en');return false;" title="English" class="glink nturl notranslate"><img src="//abc.com/wp-content/plugins/gtranslate/flags/16/en.png" height="16" width="16" alt="English"  style="vertical-align:middle;margin:0px 90px"/></a><a href="#" onclick="doGTranslate('en|id');return false;" title="Indonesian" class="glink nturl notranslate"><img src="//abc.com/wp-content/plugins/gtranslate/flags/16/id.png" height="16" width="16" alt="Indonesian"  style="vertical-align:right;margin:0px 25px"/></a><style>#goog-gt-tt{display:none!important;}.goog-te-banner-frame{display:none!important;}.goog-te-menu-value:hover{text-decoration:none!important;}.goog-text-highlight{background-color:transparent!important;box-shadow:none!important;}body{top:0!important;}#google_translate_element2{display:none!important;}</style>
    <div id="google_translate_element2"></div>
    <script>function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'en',autoDisplay: false}, 'google_translate_element2');}if(!window.gt_translate_script){window.gt_translate_script=document.createElement('script');gt_translate_script.src='https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2';document.body.appendChild(gt_translate_script);}</script>
    
    <script>
    function GTranslateGetCurrentLang() {var keyValue = document['cookie'].match('(^|;) ?googtrans=([^;]*)(;|$)');return keyValue ? keyValue[2].split('/')[2] : null;}
    function GTranslateFireEvent(element,event){try{if(document.createEventObject){var evt=document.createEventObject();element.fireEvent('on'+event,evt)}else{var evt=document.createEvent('HTMLEvents');evt.initEvent(event,true,true);element.dispatchEvent(evt)}}catch(e){}}
    function doGTranslate(lang_pair){if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];if(GTranslateGetCurrentLang() == null && lang == lang_pair.split('|')[0])return;if(typeof ga=='function'){ga('send', 'event', 'GTranslate', lang, location.hostname+location.pathname+location.search);}var teCombo;var sel=document.getElementsByTagName('select');for(var i=0;i<sel.length;i++)if(sel[i].className.indexOf('goog-te-combo')!=-1){teCombo=sel[i];break;}if(document.getElementById('google_translate_element2')==null||document.getElementById('google_translate_element2').innerHTML.length==0||teCombo.length==0||teCombo.innerHTML.length==0){setTimeout(function(){doGTranslate(lang_pair)},500)}else{teCombo.value=lang;GTranslateFireEvent(teCombo,'change');GTranslateFireEvent(teCombo,'change')}}
    </script>

    note : Please change the domain with abc name thank you.

    Plugin Author edo888

    (@edo888)

    Hi,

    First I see that you have some “protection” plugin wccp-pro which is adding an invisible layer on top of the flag images which can possible break things, so I recommend turning it off. I would say such plugins are waste of time and they just make your website slow and you have false sense of “protection”.

    I can also see that GTranslate code has been modified and I see style=”vertical-align:middle;margin:0px 90px” which obviously creates a gap between the flags. You need to use the default code we provide and the flags will appear side by side without the huge gap as on your website.

    Thanks! 🙂

    Thread Starter murnialay

    (@murnialay)

    wccp-pro already turn off now..
    and about gt translate if i use default code..if I use the default code it is aligned but closes the text behind it on the mobile browser. so I want to move it so that the Indonesian flag is right next to the US flag in its current position

    flag

    I want the two flags to be in the middle between the logo and the heart

    • This reply was modified 1 year, 11 months ago by murnialay.
    Plugin Author edo888

    (@edo888)

    Hi,

    You are using Floating language selector option and depending on the screen resolution it will be displayed differently and cover different areas of the text.

    You either need to add the language selector inside the top right corner menu or you can place it somewhere which is not so crowded like bottom left corner of your website.

    Thanks! 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘move flag icon to the left..’ is closed to new replies.