xref: /webtrees/resources/views/setup/step-1-language.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Localization\Locale\LocaleInterface;
6use Fisharebest\Webtrees\I18N;
7use Illuminate\Support\Collection;
8
9/**
10 * @var string                          $dbhost
11 * @var string                          $dbname
12 * @var string                          $dbpass
13 * @var string                          $dbport
14 * @var string                          $dbtype
15 * @var string                          $dbuser
16 * @var Collection<int,string>          $errors
17 * @var string                          $lang
18 * @var Collection<int,LocaleInterface> $locales
19 * @var string                          $tblpfx
20 * @var Collection<int,string>          $warnings
21 * @var string                          $wtemail
22 * @var string                          $wtname
23 * @var string                          $wtpass
24 * @var string                          $wtuser
25 */
26
27?>
28
29<form method="post" autocomplete="off">
30    <input name="dbtype" type="hidden" value="<?= e($dbtype) ?>">
31    <input name="dbhost" type="hidden" value="<?= e($dbhost) ?>">
32    <input name="dbport" type="hidden" value="<?= e($dbport) ?>">
33    <input name="dbuser" type="hidden" value="<?= e($dbuser) ?>">
34    <input name="dbpass" type="hidden" value="<?= e($dbpass) ?>">
35    <input name="dbname" type="hidden" value="<?= e($dbname) ?>">
36    <input name="tblpfx" type="hidden" value="<?= e($tblpfx) ?>">
37    <input name="wtname" type="hidden" value="<?= e($wtname) ?>">
38    <input name="wtuser" type="hidden" value="<?= e($wtuser) ?>">
39    <input name="wtpass" type="hidden" value="<?= e($wtpass) ?>">
40    <input name="wtemail" type="hidden" value="<?= e($wtemail) ?>">
41
42    <div class="row mb-3">
43        <label class="col-form-label col-sm-3" for="lang">
44            <?= I18N::translate('Language') ?>
45        </label>
46        <div class="col-sm-9">
47            <select class="form-select" id="lang" name="lang">
48                <?php foreach ($locales as $locale) : ?>
49                    <option value="<?= $locale->languageTag() ?>" <?= $lang === $locale->languageTag() ? 'selected' : '' ?>>
50                        <?= $locale->endonym() ?>
51                    </option>
52                <?php endforeach ?>
53            </select>
54        </div>
55    </div>
56
57    <hr>
58
59    <div>
60        <button class="btn btn-primary" name="step" type="submit" value="2">
61            <?= I18N::translate('next') ?>
62        </button>
63    </div>
64</form>
65