Break up PHP select menu -


i´m kind of noob in php things , got following problem:

i got plugin helps me making website 2 languages. tell plugin languages want have in contao-backend , can use them in frontend. can chose wether want able switch language clicking on flag or clicking language in select box. there no option have languages next each other without flag. text "german spanish". select box or flags.

i opened template select box , tells me this:

<?php /**  menu switching between languages of page.  */  ?><form name="<?php echo $this->type;?>" method="post"  style="display:inline" ><select name="language" onchange="this.form.submit();">  <?php foreach ($this->items $item): ?> <option value="<?php echo $item['language'];?>" <?php      if ($item['isactive']) {         echo ' class="active" selected="selected"';     } ?>><?php      echo $this->languages[$item['language']]; ?></option> <?php endforeach; ?></select><input type="hidden" name="request_token" value="{{request_token}}" /></form> 

(this 1 can switch select box)

and:

<form name="<?php echo $this->type;?>" method="post"  style="display:inline" ><?php foreach ($this->items $item): ?><input      class="language" type="radio" name="language"      id="language_<?php echo $item['language'];?>"      onchange="this.form.submit();"     value="<?php echo $item['language'];?>" <?php  if ($item['isactive']) {echo ' class="active" checked="checked"';} ?>  /> <label for="language_<?php echo $item['language'];?>" <?php      if ($item['isactive']) {echo ' class="active"';} ?>><img src="<?php  echo 'system/modules/i18nl10n/html/flag_icons/png/'.$item['language'].'.png';?>" title="<?php echo $this->languages[$item['language']];?>" alt="<?php echo $this->languages[$item['language']];?>" /></label><?php endforeach; ?><input type="hidden" name="request_token" value="{{request_token}}"></form> 

(this 1 lets me change language clocking on flag)

....

my question if knows how can edit code in way shows me languages can chose in text "german spanish".

sorry english :p

greetings

you can remove <img> tag , replace language name: (i have improved code formatting better readability)

<form name="<?php echo $this->type;?>" method="post"  style="display:inline">     <?php foreach ($this->items $item): ?>         <input class="language" type="radio" name="language"              id="language_<?php echo $item['language'];?>"               onchange="this.form.submit();"              value="<?php echo $item['language'];?>"              <?php                   if ($item['isactive']) {                      echo ' class="active" checked="checked"';                  }              ?>         />         <label for="language_<?php echo $item['language'];?>"             <?php if ($item['isactive']) { echo ' class="active"'; } ?>         >             <?php echo $this->languages[$item['language']];?>         </label>     <?php endforeach; ?>     <input type="hidden" name="request_token" value="{{request_token}}"> </form> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -