Fix default locale available twice

This commit is contained in:
grandeljay 2022-03-27 09:06:32 +02:00
parent db26c69ecd
commit 56e4f7e7ff

View file

@ -105,7 +105,9 @@ $page->navigation();
<label><?= __('Language') ?></label> <label><?= __('Language') ?></label>
<select class="ui search dropdown" name="user-locale"> <select class="ui search dropdown" name="user-locale">
<option value="<?= DEFAULT_LOCALE ?>"><?= \Locale::getDisplayName(DEFAULT_LOCALE, $user->locale) ?></option> <?php if (!in_array('en', $locales)) { ?>
<option value="<?= 'en' ?>"><?= \Locale::getDisplayName('en', $user->locale) ?></option>
<?php } ?>
<?php foreach ($locales as $locale) { ?> <?php foreach ($locales as $locale) { ?>
<?php if ($locale === $user->locale) { ?> <?php if ($locale === $user->locale) { ?>