<?php if (count($languages) > 1) { ?>

	<div id="form-language" class="pull-right dropdown dropdown-contain hidden-xs">

		<div class="leng-group btn-leng dropdown-toggle" data-toggle="dropdown">
			<?php foreach ($languages as $language) { ?>
				<?php if ($language['current']) { ?><?php } ?>
			<?php } ?>
			<span><?php echo $text_language; ?></span>
			<i class="fa fa-angle-down"></i>
		</div>

		<ul class="dropdown dropdown-menu dropdown-menu-left">
			<?php foreach ($languages as $language) { ?>
				<li>
					<button class="btn btn-leng btn-block language-select" onclick="window.location = '<?php echo $language['url']; ?>'"><?php echo $language['name']; ?></button>
				</li>
			<?php } ?>
		</ul>

	</div>

	<div class="visible-xs pull-right">
		<form id="form-language-select">
			<select id="select-language" onchange="window.location = $(this).val();">
				<?php foreach ($languages as $language) { ?>
					<?php if ($language['current']) { ?>
						<option selected value="<?php echo $language['url']; ?>"><?php echo $language['name']; ?></option>
					<?php }else{ ?>
						<option value="<?php echo $language['url']; ?>"><?php echo $language['name']; ?></option>
					<?php } ?>
				<?php } ?>
			</select>
		</form>
	</div>

<?php } ?>
