WordPress.org

Forums

mqTranslate
Text label (EN/FR) side by side (7 posts)

  1. ricomtl
    Member
    Posted 11 months ago #

    I just upgraded from qTranslate to mqtranslate without any issues.

    In my header, I used to have FR/EN side by side (text only, no flags) and now that I've upgaded, each language appears on 1 line..

    so it looks like:

    EN

    FR

    how can I get them together on one line?!

    Thks

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

  2. ritmanis
    Member
    Posted 11 months ago #

    Hey,

    I usually don't use the built in language switcher, but instead, make my own with HTML, so it's more customizable.

    Basically, you can do this in your header.php file:

    <a href="/fr/">FR</a> / <a href="/en/">EN</a>

    And modify it by your own needs.
    You can even add some custom CSS for your active language if you want to.

  3. ricomtl
    Member
    Posted 11 months ago #

    Thanks ritmanis. Your solution works, however it goes back to the homepage (/en or /fr) rather than switching the existing page to its equivalent translated content.

  4. ritmanis
    Member
    Posted 11 months ago #

    I haven't tested it myself, but this should work:

    <a href="/fr/<?php echo get_permalink(); ?>">FR</a> / <a href="/en/<?php echo get_permalink(); ?>">EN</a>

  5. ricomtl
    Member
    Posted 11 months ago #

    ritmanis, thanks again for your time! I just tried it, it appears side by side as you pointed out, however the URL it calls is the full permalink followed by /fr + full permalink again, therefore it opens a 404.

    I feel that we are close!!! :)

    thks!

  6. giscist
    Member
    Posted 10 months ago #

    Hi,
    Did you manage to get where you wanted? If so, can you share the solution?
    Thanks!

  7. ricomtl
    Member
    Posted 10 months ago #

    I wasn't able to do it myself so I left as is.

Reply

You must log in to post.

About this Plugin

  • mqTranslate
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.