get current language icon hilighting Opencart

Please LogIn to Reply!

Post By: guest | 01-12-2013 07:57 Reply

Question

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 "catalogviewthemedefaulttemplatecommonheader.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

Tags:

opencart get current language

Reply Or Comment!
Please LogIn to Reply!