Page 1 of 1

get current language icon hilighting

Posted: Thu Nov 24, 2011 4:46 pm
by trait
Recently I installed the opencart_v1.5.1.3.1 when I added a lanaguage, the front language icons are the same display, you could not know which is the current one.

So I do some change of my "catalog\view\theme\default\template\common\header.tpl"

Only add

Code: Select all

<?php if($lang!=$language['code']) {echo ' style="filter:alpha(opacity=30);"';} ?>
to header about line 59

Code: Select all

<?php foreach ($languages as $language) { ?>
      &nbsp;<img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>" onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>').submit(); $(this).parent().parent().submit();"<?php if($lang!=$language['code']) {echo ' style="filter:alpha(opacity=30);"';} ?> />
      <?php } ?>
That's all.
Holp this can help