• Hi.

    When i show langs in wordpress theme, i want to show only iso codes, like ES EN FR.

    I write mod to use <?php echo qtrans_generateLanguageSelectCode(‘iso’); ?> but doesn’t work, it shows empty.

    mqtranslate_widget.php line 82 after break;

    case 'iso':
            echo '<ul class="qtrans_language_chooser" id="'.$id.'">';
    				foreach(qtrans_getSortedLanguages() as $language) {
    					echo '<li';
    					if($language == $q_config['language'])
    						echo ' class="active"';
    					echo '><a href="'.qtrans_convertURL($url, $language).'"';
    					echo ' class="qtrans_iso" title="'.$q_config['language_name'][$language].'"';
    					echo '><span>'.$language.'</span></a></li>';
    				}
    				echo "</ul><div class=\"qtrans_widget_end\"></div>";
    				break;

    and mqtranslate_widget.inc.php line 35
    if($type!='text'&&$type!='image'&&$type!='both'&&$type!='dropdown'&&$type!='iso') $type='text';

    https://wordpress.org/plugins/mqtranslate/

Viewing 1 replies (of 1 total)
  • I’ve been looking for the same functionality but had no success so far, ended up just resorting to changing the language names to their shortened versions in the plugin language list itself, for using with the ‘text’ language selector.

    I hope they’ll eventually add such functionality on a future update.

Viewing 1 replies (of 1 total)

The topic ‘How to show ISO codes only?’ is closed to new replies.