xref: /webtrees/resources/views/edit/language-checkboxes.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var array<string> $languages - Currently selected languages
9 */
10
11?>
12<div style="columns: auto 12rem">
13    <?php foreach (I18N::activeLocales() as $locale) : ?>
14        <div class="form-check">
15            <label title="<?= e($locale->languageTag()) ?>">
16                <input type="checkbox" name="languages[]" value="<?= e($locale->languageTag()) ?>" <?= in_array($locale->languageTag(), $languages, true) ? 'checked' : '' ?>>
17                <?= $locale->endonym() ?>
18            </label>
19        </div>
20    <?php endforeach ?>
21</div>
22