xref: /webtrees/resources/views/edit/language-checkboxes.phtml (revision 4a9a60957058ca2a34e30a0d6f783e1540606590)
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