<?php

/**
 * @var $locale
 */

?>
<div class="modal-header align-items-center">
    <h4 class="modal-title">
        <?= __('Select language') ?>
    </h4>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
        <span class="icon">&times;</span>
    </button>
</div>
<div class="modal-body">
    <form action="/language/" method="post" name="select_language">
        <?php foreach ($config['lng_list'] as $key => $val): ?>
            <div class="custom-control custom-radio mb-2">
                <input type="radio" id="lang_<?= $key ?>" name="setlng" class="custom-control-input" value="<?= $key ?>" <?= ($key == $locale ? ' checked="checked"' : '') ?>>
                <label class="custom-control-label" for="lang_<?= $key ?>">
                    <img src="<?= $this->asset('images/flags/' . strtolower($key) . '.png') ?>" alt=".">
                    <?= $val['name'] ?>
                </label>
            </div>
        <?php endforeach ?>
    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-primary select_language"><?= __('Apply') ?></button>
</div>
