Skip to content

Commit

Permalink
Remove multilanguage flags
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-gardener committed Jul 25, 2024
1 parent d141b4e commit 4ab3f68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/Multilanguage/MultilanguagePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ public function filterLocale($locale)
public function filterAdminNavigationGlobal($nav)
{
$enabledLocales = unserialize(get_option('multilanguage_locales_admin'));
if (empty($enabledLocales)) {
if (empty($enabledLocales) || count($enabledLocales) == 1) {
return $nav;
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/Multilanguage/views/shared/common/locale-switcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
<?php $country = $this->localeToCountry($locale); ?>
<li>
<?php if ($currentLocale == $locale): ?>
<span class="active flag-icon flag-icon-<?php echo strtolower($country); ?>"></span> <?php echo locale_human_ui($locale); ?>
<?php echo locale_human_ui($locale); ?>
<?php else: ?>
<?php $language = Zend_Locale::getTranslation(substr($locale, 0, 2), 'language'); ?>
<?php $url = url('setlocale', array('locale' => $locale, 'redirect' => $currentUrl) + $query); ?>
<a href="<?php echo $url ; ?>" title="<?php echo locale_human_ui($locale); ?>"><span class="flag-icon flag-icon-<?php echo strtolower($country); ?>"></span> <?php echo locale_human_ui($locale); ?></a>
<a href="<?php echo $url ; ?>" title="<?php echo locale_human_ui($locale); ?>"><?php echo locale_human_ui($locale); ?></a>
<?php endif; ?>
</li>
<?php endforeach; ?>
Expand Down

0 comments on commit 4ab3f68

Please sign in to comment.