Support » Plugin: qTranslate X » Can't switch back to default language

  • Resolved ShadowsDweller

    (@shadowsdweller)


    Hello,

    Thanks for bringing this plugin back to life!

    I have a tiny problem with it though. I have 2 languages installed: Bulgarian (default) and English.

    Once I switch to english in front-end, even if I click on the bulgarian icon it doesn’t switch the language back to bulgarian.

    Here is an example situation – the language switcher buttons are:
    http://domain.com/
    http://domain.com/en

    I noticed that it only switches to bulgarian if a open http://domain.com/bg, which does the switching and redirects to http://domain.com/ after that.

    I believe its a bug – it should be switching to bulgarian if I open URL that doesn’t have a /en/ suffix. At least the old qTranslate used to work that way.

    https://wordpress.org/plugins/qtranslate-x/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Gunu

    (@grafcom)

    @shadowsdweller,

    Temporarily disable all other plugins and see if that makes a difference.

    If so, activate the plugins one by one and see where it goes wrong.

    Try it also with a standard WP theme.

    Thanks, I will check that. And I would like to report another thing:

    qtranslate_compatibility.php:

    function qtrans_join($texts) {
    if(!is_array($texts)) $texts = qtranxf_split($texts);
    qtranxf_join_b($texts);
    }

    The function is not wrapped in “function_exists” and doesn’t return the value 🙂 Please fix that in the next release.

    Plugin Author John Clause

    (@johnclause)

    Thanks, @shadowsdweller, next version will have a fix for qtrans_join.

    I noticed that it only switches to bulgarian if a open http://domain.com/bg

    It is “by design”, reading this may help: https://qtranslatexteam.wordpress.com/2015/02/26/browser-redirection-based-on-language/

    I’m also having this bug. It happens if I e.g. set German (English is main language without prefix) – then follow a link do domain.com/somesite/

    now /somesite/ will be en German. (though German should only appear using de/somesite/).
    (mind though – that i’m still using
    && !isset($_SERVER[‘REDIRECT_STATUS’]);

    for redirection – because everything else will break my payment page links and s2member protected donwloads (s2member / qtranslate-x incompatibility).

    Of course all links shown then will be /de/ – so as soon as you continue surfing as a user – you will be shown German pages using /de/ or you could use the language switcher once – to get the right cookie and then see the proper site.

    It would be better if as soon as German language cookie is detected – the user is also redirected to /de/ instead of being shown secondary language on main site without prefix.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can't switch back to default language’ is closed to new replies.