<?php global $page_info, $frontend_languages, $module_settings; ?>

<?php if(count($frontend_languages) > 1) foreach($frontend_languages as $language) { ?>
	<a class="<?php if($_SESSION['language'] == $language) echo 'active'; ?>" href="<?php echo $page_info->href; ?>/language/<?php echo trim($language); ?>/"><?php if($module_settings['languages']['use icons'] == 0) echo substr(trim($language), 0, 2); else { ?><img src="<?php echo $module_settings['languages']['icon path'] . substr(trim($language), 0, 2); ?>.gif" alt="<?php echo trim($language); ?>"><?php } ?></a>
<?php } ?>