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