• Skip to primary navigation
  • Skip to main content
  • Skip to footer

tatica.org

ps ax | grep tuxilandia

  • Main
  • Blog
  • Categories
    • General
    • Linux
    • Gimp100Podcast
    • Design
    • Photography
    • HowTo
    • Fedora
    • Ubuntu
    • Events
  • Store
  • Who?
  • English
  • Español

Add a mQtranslate language selector to your header

30 June, 2014 by tatica Leave a Comment

After a massive migration of all my personal and clients websites to mQtranslate, there are some things that you need to add, mostly, when you work with custom front pages, one of those is the language selector at the header.

Process as always is quite simple, so let’s get to it. First is to add the instruction that calls the active languages to the header:

<?php qtrans_generateLanguageSelectCode(); ?>

Then, you just need to add some stile. I would recommend you to add all the css tags for each language you will use, since right now, i haven’t found an easy way to add them automatically without needing jquery (if you know a better way, please let me know!)

As you can see, is quite simple; and with a good style things won’t look too crappy. For this example I used a rounded icon shape using just css (border-radius) and the theme color. Try to not use images, so you can change it easily.

You will always have the option to add a personalized widget to your header, and from the admin just drag the mQtranslate box. Mostly, this method is due curiosity… curiosity is what makes us learn something different every day.

qtrans_language_chooser {
display: inline;
list-style: none;
float: right;
margin-top: 10px;
}

.lang-eu {
background: rgb(62, 129, 214);
border-radius: 20px;
padding: 5px;
}

.lang-es {
background: rgb(62, 129, 214);
border-radius: 20px;
padding: 5px;
margin-bottom: 4px;
}

.lang-es a, .lang-eu a {
color: #ffffff;
font-family: ‘Patua One’, cursive;
text-align: center;
}


Help tatica and donate with paypal!

Social:

  • Email
  • Facebook
  • Reddit
  • Twitter

Filed Under: Fedora, General, HowTo, Linux, Wordpress Tagged With: css, header, howto, lang-select, language, mqtranslate, select, wordpress

Reader Interactions

Leave a Reply Cancel reply

Footer

Free college writing tips for students and teachers.
Internationalvaquero.com - online writing help for students.

About Tatica

I’m a full-time designer, photographer and community people. I love to analyze how this interactive world works. I’m not a programmer, however that’s how I started. I have been in the field since 2005 and have been loving every minute of it.
I love to learn and teach what I know about FLOSS and I enjoy meeting new friends from all around the world.
  • Subscribe
  • Privacy
  • Contact
COPYRIGHT © TATICA 2021
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.