Show current lang instead of "select language"

Popular automatic website translation tool

Show current lang instead of "select language"

Postby yoligrana » Sat Mar 23, 2013 3:25 pm

Hi, I need to show up the current language instead of "select language".
For example, if the site is translated into spanish I want to show up the spanish flag and text on the selector.
How can I do this? there's a site that did that: http://www.naharro.com/

Thanks in advance,
Kind Regards,
Yolanda.
yoligrana
 
Posts: 5
Joined: Sat Mar 23, 2013 3:13 pm

Re: Show current lang instead of "select language"

Postby yoligrana » Sat Mar 23, 2013 4:00 pm

Now I have the current language showing up on top instead of "select language". Just needed to clear the line
Code: Select all
echo '<option value="">Select Language</option>';


My site is http://negre.es/tienda/ (see language selector top right)

Now I just need to show up the flag next to the language as on the dropdown selector.
Again: how can I do this?

my full code:

Code: Select all
elseif ($look == 'dropdown') {
    echo '<select onchange="doGTranslate(this);">';
    Here was the "select language"
    $i = 0;
    foreach($lang_array as $lang => $lang_name) {
        $show_this = 'show_'.str_replace('-', '', $lang);
        $flag_y = $flag_map_vertical[$lang];
        if($$show_this)
            echo '<option value="'.$language.'|'.$lang.'" style="'.($lang == $language ? 'font-weight:bold;' : '').'background:url(\''.JURI::root(true).'/modules/mod_gtranslate/tmpl/lang/16l.png\') no-repeat scroll 0 -'.$flag_y.'px;padding-left:18px;">'.$lang_name.'</option>';
    }


Thanks in advance,
Kind Regards,
Yolanda.
yoligrana
 
Posts: 5
Joined: Sat Mar 23, 2013 3:13 pm

Re: Show current lang instead of "select language"

Postby plastique » Sat Mar 23, 2013 4:32 pm

Hi yoligrana,

In mozilla, your flags are shown, but in chrome not.

I have the same problem.
plastique
 
Posts: 9
Joined: Sat Mar 09, 2013 4:05 pm

Re: Show current lang instead of "select language"

Postby Yana » Sat Mar 23, 2013 11:37 pm

Hi,
With the default select tag it works only for FireFox. But you can create another dropdown to have flags inside.
Please check this post:
how-add-the-flag-inside-the-dropdown-menu-t2337.html?hilit=flags%20dropdown#p9075
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: Show current lang instead of "select language"

Postby yoligrana » Mon Mar 25, 2013 1:40 pm

Hi Yana,
Actually I see all the language flags when I dropdown.
my question is how to display the current language flag next to my current language.
See http://negre.es/tienda/ the language selector is on top right side. As you see I delete the "select language" line and now it shows up the current language. I only need to display the flag next to it like in the dropdown. Here is my current code:

Code: Select all
elseif ($look == 'dropdown') {
    echo '<select onchange="doGTranslate(this);">';
    Here was the "select language"
    $i = 0;
    foreach($lang_array as $lang => $lang_name) {
        $show_this = 'show_'.str_replace('-', '', $lang);
        $flag_y = $flag_map_vertical[$lang];
        if($$show_this)
            echo '<option value="'.$language.'|'.$lang.'" style="'.($lang == $language ? 'font-weight:bold;' : '').'background:url(\''.JURI::root(true).'/modules/mod_gtranslate/tmpl/lang/16l.png\') no-repeat scroll 0 -'.$flag_y.'px;padding-left:18px;">'.$lang_name.'</option>';


Any hep appreciated!!
Regards,
Yolanda.
yoligrana
 
Posts: 5
Joined: Sat Mar 23, 2013 3:13 pm

Re: Show current lang instead of "select language"

Postby Yana » Mon Mar 25, 2013 5:11 pm

Hi,
You can customize the language selector. You can check the source code of our website and copy the code . Here is an example:
Code: Select all
<style type="text/css">
    <!--

            .flag {font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url(/modules/mod_gtranslate/tmpl/lang/16.png);}
            .flag img, .alt_flag img {border:0;margin-top:2px;}
            .alt_flag {font-size:16px;padding:1px 0;background-repeat:no-repeat;background-image:url(/modules/mod_gtranslate/tmpl/lang/alt_flags.png);}
       

            .switcher {float:right;margin-top:3px;margin-left:10px;font-family:Arial;font-size:10pt;text-align:left;cursor:pointer;overflow:hidden;position:relative;}
            .switcher a {text-decoration:none;display:block;font-size:10pt;}
            .switcher a span {margin-right:3px;padding:0;display:block;float:left;}
            .switcher .selected {background:#FFFFFF url(/modules/mod_gtranslate/tmpl/switcher.png) repeat-x;position:relative;z-index:9999;}
            .switcher .selected a {border:1px solid #CCCCCC;background:url(/modules/mod_gtranslate/tmpl/arrow_down.png) 146px center no-repeat;color:#666666;padding:3px 5px;width:151px;}
            .switcher .selected a:hover {background:#F0F0F0 url(/modules/mod_gtranslate/tmpl/arrow_down.png) 146px center no-repeat;}
            .switcher .option {position:relative;z-index:9998;border-left:1px solid #CCCCCC;border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background-color:#EEEEEE;display:none;width:161px;}
            .switcher .option a {color:#000;padding:3px 5px;}
            .switcher .option a:hover {background:#FFC;}
       
    -->
  </style>

 
<script type="text/javascript">
$E = document.getElement;
              window.addEvent('domready', function() {
                myFx = new Fx.Slide($E('.option'), {duration: 300}).hide();
                $E('.option').setStyle('display', 'block');
                $$('.switcher').addEvent('click', function() {myFx.toggle();});
                $$('.switcher').addEvent('mouseleave', function() {myFx.slideOut();});
            });
       
  </script>
 


<script type="text/javascript">
//<![CDATA[
                    function doTranslate(lang_pair) {if(lang_pair.value)lang_pair=lang_pair.value;if(lang_pair=='')return;var lang=lang_pair.split('|')[1];var plang=location.pathname.split('/')[1];if(plang.length !=2 && plang != 'zh-CN' && plang != 'zh-TW')plang='en';location.href=location.protocol+'//'+location.host+'/'+lang+location.pathname.replace('/'+plang, '')+location.search;}
            //]]>
</script>
 
<div class="switcher notranslate">
<div class="selected"><a href="#" onclick="return false;"><span class="flag" style="background-position:-0px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Urdu" /></span>English</a></div>
<div class="option">
<a href="javascript:doTranslate('en|en')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'en', location.pathname+location.search])" title="English" class="nturl"> <span class="flag" style="background-position:-0px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="English" /></span>English</a>
<a href="javascript:doTranslate('en|af')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'af', location.pathname+location.search])" title="Afrikaans" class="nturl"> <span class="flag" style="background-position:-300px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Afrikaans" /></span>Afrikaans</a>
<a href="javascript:doTranslate('en|sq')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'sq', location.pathname+location.search])" title="Albanian" class="nturl"> <span class="flag" style="background-position:-300px -400px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Albanian" /></span>Albanian</a>
<a href="javascript:doTranslate('en|ar')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ar', location.pathname+location.search])" title="Arabic" class="nturl"> <span class="flag" style="background-position:-100px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Arabic" /></span>Arabic</a>
<a href="javascript:doTranslate('en|hy')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'hy', location.pathname+location.search])" title="Armenian" class="nturl"> <span class="flag" style="background-position:-400px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Armenian" /></span>Armenian</a>
<a href="javascript:doTranslate('en|az')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'az', location.pathname+location.search])" title="Azerbaijani" class="nturl"> <span class="flag" style="background-position:-500px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Azerbaijani" /></span>Azerbaijani</a>
<a href="javascript:doTranslate('en|eu')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'eu', location.pathname+location.search])" title="Basque" class="nturl"> <span class="flag" style="background-position:-600px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Basque" /></span>Basque</a>
<a href="javascript:doTranslate('en|be')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'be', location.pathname+location.search])" title="Belarusian" class="nturl"> <span class="flag" style="background-position:-0px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Belarusian" /></span>Belarusian</a>
<a href="javascript:doTranslate('en|bg')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'bg', location.pathname+location.search])" title="Bulgarian" class="nturl"> <span class="flag" style="background-position:-200px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Bulgarian" /></span>Bulgarian</a>
<a href="javascript:doTranslate('en|ca')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ca', location.pathname+location.search])" title="Catalan" class="nturl"> <span class="flag" style="background-position:-0px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Catalan" /></span>Catalan</a>
<a href="javascript:doTranslate('en|zh-CN')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'zh-CN', location.pathname+location.search])" title="Chinese (Simplified)" class="nturl"> <span class="flag" style="background-position:-300px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Chinese (Simplified)" /></span>Chinese (Simplified)</a>
<a href="javascript:doTranslate('en|zh-TW')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'zh-TW', location.pathname+location.search])" title="Chinese (Traditional)" class="nturl"> <span class="flag" style="background-position:-400px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Chinese (Traditional)" /></span>Chinese (Traditional)</a>
<a href="javascript:doTranslate('en|hr')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'hr', location.pathname+location.search])" title="Croatian" class="nturl"> <span class="flag" style="background-position:-500px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Croatian" /></span>Croatian</a>
<a href="javascript:doTranslate('en|cs')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'cs', location.pathname+location.search])" title="Czech" class="nturl"> <span class="flag" style="background-position:-600px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Czech" /></span>Czech</a>
<a href="javascript:doTranslate('en|da')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'da', location.pathname+location.search])" title="Danish" class="nturl"> <span class="flag" style="background-position:-700px -0px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Danish" /></span>Danish</a>
<a href="javascript:doTranslate('en|nl')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'nl', location.pathname+location.search])" title="Dutch" class="nturl"> <span class="flag" style="background-position:-0px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Dutch" /></span>Dutch</a>
<a href="javascript:doTranslate('en|fi')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'fi', location.pathname+location.search])" title="Finnish" class="nturl"> <span class="flag" style="background-position:-100px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Finnish" /></span>Finnish</a>
<a href="javascript:doTranslate('en|fr')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'fr', location.pathname+location.search])" title="French" class="nturl"> <span class="flag" style="background-position:-200px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="French" /></span>French</a>
<a href="javascript:doTranslate('en|ka')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ka', location.pathname+location.search])" title="Georgian" class="nturl"> <span class="flag" style="background-position:-700px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Georgian" /></span>Georgian</a>
<a href="javascript:doTranslate('en|de')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'de', location.pathname+location.search])" title="German" class="nturl"> <span class="flag" style="background-position:-300px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="German" /></span>German</a>
<a href="javascript:doTranslate('en|el')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'el', location.pathname+location.search])" title="Greek" class="nturl"> <span class="flag" style="background-position:-400px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Greek" /></span>Greek</a>
<a href="javascript:doTranslate('en|iw')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'iw', location.pathname+location.search])" title="Hebrew" class="nturl"> <span class="flag" style="background-position:-200px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Hebrew" /></span>Hebrew</a>
<a href="javascript:doTranslate('en|hi')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'hi', location.pathname+location.search])" title="Hindi" class="nturl"> <span class="flag" style="background-position:-500px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Hindi" /></span>Hindi</a>
<a href="javascript:doTranslate('en|hu')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'hu', location.pathname+location.search])" title="Hungarian" class="nturl"> <span class="flag" style="background-position:-600px -400px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Hungarian" /></span>Hungarian</a>
<a href="javascript:doTranslate('en|id')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'id', location.pathname+location.search])" title="Indonesian" class="nturl"> <span class="flag" style="background-position:-300px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Indonesian" /></span>Indonesian</a>
<a href="javascript:doTranslate('en|ga')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ga', location.pathname+location.search])" title="Irish" class="nturl"> <span class="flag" style="background-position:-600px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Irish" /></span>Irish</a>
<a href="javascript:doTranslate('en|it')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'it', location.pathname+location.search])" title="Italian" class="nturl"> <span class="flag" style="background-position:-600px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Italian" /></span>Italian</a>
<a href="javascript:doTranslate('en|ja')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ja', location.pathname+location.search])" title="Japanese" class="nturl"> <span class="flag" style="background-position:-700px -100px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Japanese" /></span>Japanese</a>
<a href="javascript:doTranslate('en|ko')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ko', location.pathname+location.search])" title="Korean" class="nturl"> <span class="flag" style="background-position:-0px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Korean" /></span>Korean</a>
<a href="javascript:doTranslate('en|lv')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'lv', location.pathname+location.search])" title="Latvian" class="nturl"> <span class="flag" style="background-position:-400px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Latvian" /></span>Latvian</a>
<a href="javascript:doTranslate('en|lt')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'lt', location.pathname+location.search])" title="Lithuanian" class="nturl"> <span class="flag" style="background-position:-500px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Lithuanian" /></span>Lithuanian</a>
<a href="javascript:doTranslate('en|mk')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'mk', location.pathname+location.search])" title="Macedonian" class="nturl"> <span class="flag" style="background-position:-200px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Macedonian" /></span>Macedonian</a>
<a href="javascript:doTranslate('en|ms')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ms', location.pathname+location.search])" title="Malay" class="nturl"> <span class="flag" style="background-position:-400px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Malay" /></span>Malay</a>
<a href="javascript:doTranslate('en|mt')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'mt', location.pathname+location.search])" title="Maltese" class="nturl"> <span class="flag" style="background-position:-700px -400px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Maltese" /></span>Maltese</a>
<a href="javascript:doTranslate('en|no')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'no', location.pathname+location.search])" title="Norwegian" class="nturl"> <span class="flag" style="background-position:-100px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Norwegian" /></span>Norwegian</a>
<a href="javascript:doTranslate('en|fa')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'fa', location.pathname+location.search])" title="Persian" class="nturl"> <span class="flag" style="background-position:-200px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Persian" /></span>Persian</a>
<a href="javascript:doTranslate('en|pl')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'pl', location.pathname+location.search])" title="Polish" class="nturl"> <span class="flag" style="background-position:-200px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Polish" /></span>Polish</a>
<a href="javascript:doTranslate('en|pt')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'pt', location.pathname+location.search])" title="Portuguese" class="nturl"> <span class="flag" style="background-position:-300px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Portuguese" /></span>Portuguese</a>
<a href="javascript:doTranslate('en|ro')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ro', location.pathname+location.search])" title="Romanian" class="nturl"> <span class="flag" style="background-position:-400px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Romanian" /></span>Romanian</a>
<a href="javascript:doTranslate('en|ru')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ru', location.pathname+location.search])" title="Russian" class="nturl"> <span class="flag" style="background-position:-500px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Russian" /></span>Russian</a>
<a href="javascript:doTranslate('en|sr')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'sr', location.pathname+location.search])" title="Serbian" class="nturl"> <span class="flag" style="background-position:-600px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Serbian" /></span>Serbian</a>
<a href="javascript:doTranslate('en|sk')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'sk', location.pathname+location.search])" title="Slovak" class="nturl"> <span class="flag" style="background-position:-700px -300px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Slovak" /></span>Slovak</a>
<a href="javascript:doTranslate('en|sl')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'sl', location.pathname+location.search])" title="Slovenian" class="nturl"> <span class="flag" style="background-position:-0px -400px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Slovenian" /></span>Slovenian</a>
<a href="javascript:doTranslate('en|es')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'es', location.pathname+location.search])" title="Spanish" class="nturl"> <span class="flag" style="background-position:-600px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Spanish" /></span>Spanish</a>
<a href="javascript:doTranslate('en|sw')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'sw', location.pathname+location.search])" title="Swahili" class="nturl"> <span class="flag" style="background-position:-500px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Swahili" /></span>Swahili</a>
<a href="javascript:doTranslate('en|sv')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'sv', location.pathname+location.search])" title="Swedish" class="nturl"> <span class="flag" style="background-position:-700px -200px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Swedish" /></span>Swedish</a>
<a href="javascript:doTranslate('en|th')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'th', location.pathname+location.search])" title="Thai" class="nturl"> <span class="flag" style="background-position:-0px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Thai" /></span>Thai</a>
<a href="javascript:doTranslate('en|tr')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'tr', location.pathname+location.search])" title="Turkish" class="nturl"> <span class="flag" style="background-position:-100px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Turkish" /></span>Turkish</a>
<a href="javascript:doTranslate('en|uk')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'uk', location.pathname+location.search])" title="Ukrainian" class="nturl"> <span class="flag" style="background-position:-100px -400px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Ukrainian" /></span>Ukrainian</a>
<a href="javascript:doTranslate('en|ur')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'ur', location.pathname+location.search])" title="Urdu" class="nturl"> <span class="flag" style="background-position:-100px -700px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Urdu" /></span>Urdu</a>
<a href="javascript:doTranslate('en|vi')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'vi', location.pathname+location.search])" title="Vietnamese" class="nturl"> <span class="flag" style="background-position:-200px -400px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Vietnamese" /></span>Vietnamese</a>
<a href="javascript:doTranslate('en|cy')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'cy', location.pathname+location.search])" title="Welsh" class="nturl"> <span class="flag" style="background-position:-700px -500px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Welsh" /></span>Welsh</a>
<a href="javascript:doTranslate('en|yi')" onclick="_gaq.push(['_trackEvent', 'doTranslate', 'yi', location.pathname+location.search])" title="Yiddish" class="nturl"> <span class="flag" style="background-position:-300px -600px;"><img src="/modules/mod_gtranslate/tmpl/lang/blank.png" height="16" width="16" alt="Yiddish" /></span>Yiddish</a>
</div></div></div>


Please ask your web developer to make appropriate changes.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: Show current lang instead of "select language"

Postby yoligrana » Tue Mar 26, 2013 10:11 pm

Yana, the code you provided where should it go? I run gtranslate through Joomla.
Thanks in advance, hope you can help me.
yoligrana
 
Posts: 5
Joined: Sat Mar 23, 2013 3:13 pm

Re: Show current lang instead of "select language"

Postby Yana » Tue Mar 26, 2013 10:17 pm

Hi,
You can put it in your template or create a custom module.
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm

Re: Show current lang instead of "select language"

Postby yoligrana » Tue Mar 26, 2013 10:30 pm

Yana wrote:Hi,
You can put it in your template or create a custom module.


Hi Yana, thanks for your reply. In the tmpl of the module "default.php" we have:

Code: Select all
elseif ($look == 'dropdown') {
    echo '<select onchange="doGTranslate(this);">';
    [b]Here was the "select language" text[/b]
    $i = 0;
    foreach($lang_array as $lang => $lang_name) {
        $show_this = 'show_'.str_replace('-', '', $lang);
        $flag_y = $flag_map_vertical[$lang];
        if($$show_this)
            echo '<option value="'.$language.'|'.$lang.'" style="'.($lang == $language ? 'font-weight:bold;' : '').'background:url(\''.JURI::root(true).'/modules/mod_gtranslate/tmpl/lang/16l.png\') no-repeat scroll 0 -'.$flag_y.'px;padding-left:18px;">'.$lang_name.'</option>';


Sorry, I don't know how to show current active language with the flag, please see http://negre.es/tienda/
yoligrana
 
Posts: 5
Joined: Sat Mar 23, 2013 3:13 pm

Re: Show current lang instead of "select language"

Postby Yana » Wed Mar 27, 2013 8:37 pm

Dear Yoligrana,
Unfortunately, we don't provide customization service. Why don't you ask your designer or developer to do that for you?
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4129
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron