Support » Plugin: qTranslate X » Feature Request – Language Chooser Dropdown – Flag

  • Using the qtranslate language widget – I have not yet found out a way to use Dropdown Box with Flag & Text.

    Best would be to have Dropdown Box as a tickbox or as a selector with items List and Dropdown. That way all three possibilities (Flag only, Text Only, Flag and Text) could be shown either as dropdown or as list.

    Changing the widget CSS – .qtranxs_flag span { display:none; } to display:all did not make flags appear as I first hoped.

    Another option that would be good is to display the flags not below each other (useful IMHO if you have more than 2 languages) – but besides each other wihtout bullet. I did not manage to change that using the CSS either by replacing”display: inline;” with “display:list-item;”…

    — Why is this useful?
    Well the more languages your site is in – the more sense it makes to use a dropwdown. And the more languages – the more likely it is that the user will not understand the language in the dropdown. With a flag added it would be more obvious that the dropdown is there to change language too.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Clause


    It is a good idea. I updated Can you read PHP code? Would you be interested to implement it and submit a pull request at GitHub?

    Thread Starter extremecarver


    I can guestimate PHP – no more… Sorry (and I’m always on war with GitHub – more of a SVN user).

    This is a “must have”…. no only for the Widget but also for Custom Placed Language Selectors.

    I use <?php echo qtranxf_generateLanguageSelectCode(‘dropdown’); ?> and I havent found a way to add the Flags either 🙁

    Hello, if you are using Bootstrap, I have solution:

    <div class="nav navbar-nav">
        <div class="dropdown">
          <button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
          <!-- 1. This code show current language -->
    		<?php if(qtranxf_getLanguage()=='en') {
                echo "<img src='en.png> English";
            } elseif(qtranxf_getLanguage()=='lt') {
                echo "<img src='lt.png'> Lietuviškai";
          <!-- /1. -->
            <span class="caret"></span>
          <div class="dropdown-menu" aria-labelledby="dLabel">
          <!-- 2. This code show qTranslate-X widget -->
    		<?php echo qtranxf_generateLanguageSelectCode('both'); ?>
          <!-- /2. -->
          </div><!-- /dropdown-menu -->
        </div><!-- /dropdown -->
    </div><!-- /nav -->
    Thread Starter extremecarver


    Oh that’s cool – for people using bootstrap.
    In the meantime I just use two language selectors below each other – flags on top with titles – then below a dropdown widget without tittle.

    That’s not too bad either for UI…

    This code is not useful for WordPress.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Feature Request – Language Chooser Dropdown – Flag’ is closed to new replies.