<?php

use Fisharebest\Webtrees\I18N;

/**
 * @var array<string> $languages - Currently selected languages
 */

?>
<div style="columns: auto 12rem">
    <?php foreach (I18N::activeLocales() as $locale) : ?>
        <div class="form-check">
            <label title="<?= e($locale->languageTag()) ?>">
                <input type="checkbox" name="languages[]" value="<?= e($locale->languageTag()) ?>" <?= in_array($locale->languageTag(), $languages, true) ? 'checked' : '' ?>>
                <?= $locale->endonym() ?>
            </label>
        </div>
    <?php endforeach ?>
</div>
