Only show locales with region

This commit is contained in:
grandeljay 2022-06-09 11:56:51 +02:00
parent 42261e5e51
commit 92b73851ff

View file

@ -295,10 +295,12 @@ $page->navigation();
<?php } ?>
<?php foreach ($locales as $locale) { ?>
<?php if ($locale === $user->locale) { ?>
<option value="<?= $locale ?>" selected><?= \Locale::getDisplayName($locale, $user->locale) ?></option>
<?php } else { ?>
<option value="<?= $locale ?>"><?= \Locale::getDisplayName($locale, $user->locale) ?></option>
<?php if (\Locale::getRegion($locale)) { ?>
<?php if ($locale === $user->locale) { ?>
<option value="<?= $locale ?>" selected><?= \Locale::getDisplayName($locale, $user->locale) ?></option>
<?php } else { ?>
<option value="<?= $locale ?>"><?= \Locale::getDisplayName($locale, $user->locale) ?></option>
<?php } ?>
<?php } ?>
<?php } ?>
</select>