Viewing 11 replies - 1 through 11 (of 11 total)
  • It depends on your theme. if you don’t have a header widget you will need to add the code manually.

    Check this from qtranslate Faqs:

    I DON’T USE WIDGETS, HOW CAN I LET QTRANSLATE GENERATED THE LANGUAGE SELECTOR/SWITCHER?
    Just put qtrans_generateLanguageSelectCode($type) in your Templates. If you set $type = ‘image’, flags will be used, $type = ‘both’ will show flags and language, $type=’dropdown’ will generated a dropdown list instead, default is ‘text’. Example:
    <?php echo qtrans_generateLanguageSelectCode(‘both’); ?>

    Thread Starter ballyhoo

    (@ballyhoo)

    Hi Anallabres,

    Thanks a lot for the advice!!
    I am trying to do it the way you subscribe, but it is not yet working, I’m not used to work with php code..

    Leen

    I posted a method for doing this a couple of months ago:
    https://www.ads-software.com/support/topic/qtranslate-how-to-add-language-switcher-button-in-menu-bar?replies=34

    (Scroll down to the comments and search for my name).

    Unfortunately the method has suddenly stopped working after the last update to mqTranslate. Specifically, even though my menu items are meant to link to ?lang=fr and so on, they’re actually linking just back to the homepage. Hopefully that’ll be resolved soon.

    I am not an expert in php and it worked for me. You just need to add this code:
    <?php echo qtrans_generateLanguageSelectCode(‘both’); ?>

    in the header.php file where you want the switcher to show. Then you can change css if you want it to look different.

    In that code you can change ‘both’ depending on what you want to show:

    ‘text’ if you want just the name of the language
    ‘image’ if you want just the flags
    ‘both’ if you want both
    ‘dropdown’ for the language dropdown

    Hope it helps.

    Thread Starter ballyhoo

    (@ballyhoo)

    Hi Anallabres,

    It helps, it works!
    Thanks a lot.

    The only thing I have to change now, is that it should use a drop down menu instead of an image or text. Do you know what the code is for that..?

    Leen

    You should use ‘dropdown’

    Thread Starter ballyhoo

    (@ballyhoo)

    Yes!!!
    Merci beaucoup, thanks a lot!

    De nada, you’re welcome ??

    Thread Starter ballyhoo

    (@ballyhoo)

    Hallo Anallabres,

    Now it works well on a computer, but on a smartphone the language switcher doesn’t show. That has to do with the template ‘capture’ I believe..

    Have you any ideas on how to resolve this…?

    Best regards!
    Leen

    Just checked and it does show on my iphone….

    Thread Starter ballyhoo

    (@ballyhoo)

    yes, I could use your code again, and after some trial and error, it worked!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘widget choice of languages main menu available?’ is closed to new replies.