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