if (1 < count($pofiles)) { ?> <form action="#" class="loco-switcher"> <select onchange="void function(u){ u && location.assign(u) }( this.options[this.options.selectedIndex].value);"> <option value=""> <?php Loco::h(Loco::_x('Switch to...', 'Dropdown label')); ?> </option><?php // drop down of files in package $poname = str_replace('.mo', '.po', basename($path)); foreach ($pofiles as $_path) { $label = str_replace('.mo', '.po', basename($_path)); $url = LocoAdmin::edit_uri($package, $_path); ?> <option value="<?php Loco::h($url); ?> " <?php $poname === $label and print 'selected'; ?> > <?php Loco::h($label); ?> </option><?php }