<?php if ($journal3->get('catalogLanguageStatus')) { ?>
<?php if (count($languages) > 1) { ?>
<div id="language" class="language">
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-language">
  <div class="dropdown drop-menu">
    <button type="button" class="dropdown-toggle" data-toggle="dropdown">
      <span class="language-flag-title">
        <?php foreach ($languages as $language) { ?>
        <?php if ($language['code'] == $code) { ?>
        <span class="symbol" style="background-image: url('<?php echo $language['journal3_language_image']; ?>')"><img src="<?php echo $journal3_language_image_placeholder; ?>" width="<?php echo $journal3_language_image_width; ?>" height="<?php echo $journal3_language_image_height; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>"/></span>
        <span class="language-title"><?php echo $language['name']; ?></span>
        <?php } ?>
        <?php } ?>
      </span>
    </button>
    <div class="dropdown-menu j-dropdown">
    <ul class="j-menu">
      <?php foreach ($languages as $language) { ?>
      <li class="menu-item">
        <a class="language-select" data-name="<?php echo $language['code']; ?>" role="button">
          <span class="language-flag" style="background-image: url('<?php echo $language['journal3_language_image']; ?>')"><img src="<?php echo $journal3_language_image_placeholder; ?>" width="<?php echo $journal3_language_image_width; ?>" height="<?php echo $journal3_language_image_height; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>"/></span>
          <span class="language-title-dropdown"><?php echo $language['name']; ?></span>
        </a>
      </li>
      <?php } ?>
    </ul>
    </div>
  </div>
  <input type="hidden" name="code" value="" />
  <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
</form>
</div>
<?php } ?>
<?php } ?>
