• Resolved augustas

    (@augustas)


    Hello,

    I am having the same issue described in “Flags and redirection” topic.

    My question is – How could I disable the “qtrans_front_language” cookie?

    Here is the current situation:
    – The website is being migrated from the “qTranslate” to qTX.
    – The option “Hide URL language information for default language” is CHECKED.
    – Links to other languages are printed manually as text links:
    <a href="/">Default LANG</a>, <a href="/en/">ENG</a>

    The problem is that once I visit the /en/ site, then I can never go back to the default / language page. It always redirects to ‘/en/’

    Also, the “qTranslate Slug” plugin is used, so when cookie is set for English language, whenever I try to load the page “/about-me-default-lang/” – it is redirected to “/en/about-me-default-lang/”, while English version URL is “/en/about-me/”

    I would appreciate any help.
    Thank you

    https://www.ads-software.com/plugins/qtranslate-x/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Same problem here. Help would be appreciated but I am looking into it myself…

    What temporarily fixed it for me was:
    Do following changes in qtranslate-core.php:
    1. Change line 29 to:
    $q_config['cookie_enabled'] = true;
    2. Comment out line 408 (setcookie) to:
    // setcookie [...]

    This fix will only work until the next update as the update might modify this file. I hope the developers fix this. Please notice that it works when using ?lang=LANG

    Plugin Author John Clause

    (@johnclause)

    Hi All: if a link is supposed to switch the language it must have the language encoded in it. Please, read the document: https://qtranslatexteam.wordpress.com/2015/02/26/browser-redirection-based-on-language/, which may help you to understand what will get broken if we follow the suggestion here.

    We noticed, that former mq users get impression that something is broken, because mq behaves differently, while new users do not see anything unusual and generally happy. What mq- users forget is that mq- was incompatible in the situations which are now fixed with this new behaviour. mq- community does not know that, because people who found incompatibility were forced to buy WPML and now do not belong to mq community. But we want them eventually back …

    Disabling the cookies though might be ok, although it does not make much sense, since it is now designed to work without cookies as well (for the browsers with disabled cookies), taking language from the referrer link, which is not very well tested yet. Without cookies returning users might lose their language previously chosen, but once the language is chosen again, they should be fine. This is done for people who keep their cookie off, but I do not see benefits in turning off cookies for everyone.

    We may still implement an option to disable cookie just to make peculiar users happy, but this is currently not a priority. Please, feel free to submit pull request at GitHub, if you badly wish to have it right now.

    Thank you for your understanding and cooperation.

    Hello,
    Thank you for your reply. The problem is that this seems to be making the plugin qTranslate Slug incompatible.

    Thread Starter augustas

    (@augustas)

    thank you kuchenundkakao for the instructions.
    I might use it, once I decide to upgrade to qtranslate-x
    Till now I have not yet done the migration because of the issues described in this topic, but it seems you address them all with your mini-plugin.
    Thanks

    Thanks @kuchenundkakao, your plugin works great. It solved the exact situation I needed, having switched from qtranslate->mqtranslate->qtranslate x. I’ve setup my own language switches using qts_get_url($lang) links and need the language switch based on URL but default to EN with no URL extension. I hope to see an option in qtranslate x to allow this configuration going forward…

    Plugin Author John Clause

    (@johnclause)

    @augustas: The next version will have cookie control options for the sake of versatility, but I think everyone is better to read carefully this document https://qtranslatexteam.wordpress.com/2015/02/26/browser-redirection-based-on-language/ in order to understand the benefits of the new approach.

    This all doesn’t work. I am using the qTranslate Slug Language Selector (doesn’t make a difference if I use the qTranslate X one) and qTranslate X.
    Whatever I do, I cannot switch language except if I manually type in: domain.com/LANGCODE in my URL-Bar!

    Why?

    Plugin Author Gunu

    (@grafcom)

    @wordbuddypress,

    which version of qTranslate-X are you using?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to disable the "qtrans_front_language" cookie?’ is closed to new replies.