<?php

$cfg_languages_array = (function_exists('mh_get_language_list')) ? mh_get_language_list() : '';

foreach ($cfg_languages_array as $cfg_lng_item) {
    ?>
        <div style="text-align: center" ><a class="btn btn-default btn-primary_ "
                 style="margin-bottom: 10px; min-width: 50%; text-align: left; "
                 role="button"
                href="<?php echo $lng_action_url . '&lng_id=' . $cfg_lng_item['id'] ; ?>">
                <div style="display: inline-block;  vertical-align: middle; padding-right: 10px; ">
                <?php echo mh_language_image($cfg_lng_item); ?>
                </div>
                <div style="display: inline-block; vertical-align: middle;">
                <?php echo $cfg_lng_item['text']; ?>
                </div>
            </a>
        </div>
<?php
}