Adding language switcher at any point
-
Hi there,
could someone give me the exact code that I have to add at any given place of my website to add the language switcher of qTranslate X? I can’t use a widget for that.
With the old qTranslate I had it installed on the left side of the social icons in the navbar, and that’s where I would love to have it again: http://www.peterschmidtcello.com
I would really appreciate your help!
-
Can nobody help me? I mean, it worked with the “old” qTranslate, I just had to add some code within my page and into the header, and that’s it … 🙁
see under appearance – menus – language switcher to put this in the menubar,
Is this what you’re looking for?
Best
Thank you for your answer Gunu. Unfortunately it is not what I am looking for because I am using an Elegant Theme on my site and it uses it’s own menu. And I can’t add widgets to it.
What I need is actual code to put directly into the html of the menu.
OK, I really need some help, so I’m double posting again, sorry for that.
In the “old” qTranslate the code looked like this:
<?php echo qtrans_generateLanguageSelectCode('image'); ?>I need something like that again. Anybody? I’d be really thankful …
I have not tested this, but try this:
<?php echo qtranxf_generateLanguageSelectCode(‘image’); ?>
Now we’re talking, thank you very much Gunu! Now there’s just a little CSS needed to make it look good again. The flags are underneath each other right now, but I would like to have them next to each other. With the old qTranslate I had this in my CSS:
.qtrans_language_chooser li { float:left; margin-right:2px; }I tried to do the same little change as you suggested, which would be
.qtranxf_language_chooser li { float:left; margin-right:2px; }but sadly this didn’t change anything. Any ideas?
Fantastic! Thank you very much!
This is exactly what I needed.
You can also make the images of the flags with the same sizes as Facebook etc.
This should you do just outside the qtranslate plugin folder otherwise that always change by an update.
It is only a graphical suggestion.
Best
<?php echo qtranxf_generateLanguageSelectCode(‘image’); ?>
I would like to try the same, where exactly should I put this line?
The topic ‘Adding language switcher at any point’ is closed to new replies.