• Recently my website is acting up. https://www.redesiuk.com/
    I’m using qTranslate to switch between English (main language) and Polish. Every navigation button (PORTFOLIO, ABOUT ME, SERVICES, RESOURCES) is coded as follows:

    <?php
         if (qtrans_getLanguage() == 'en') {?>
             <a href="/about">ABOUT ME </a>
    <?php }
         elseif (qtrans_getLanguage() == 'pl') {?>
             <a href="/pl/about">O MNIE </a>
    <?php } ?>

    When “Polish” is picked, rolled-over links show up properly, but when clicked they send back to English version (with no /pl/ added to the address). It happens both with “Detect the language of the browser and redirect accordingly.” on and off.

    Any ideas why it happens?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kotolak

    (@kotolak)

    Got a solution from another forum!

    Apparently WP wants a slash at the end of the link to recognize the language. Without it, it sends back to original language.

    Hi, I’ve been trying to solve this for more than a month, would you please post the link to where you’ve got the solution from?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[plugin: qTranslate] WP keeps switching back to main language’ is closed to new replies.