• Resolved OttoRobba

    (@ottorobba)


    Hi there.

    I’m using Transposh on a project and it works fine except for a considerable hiccup.

    First, clicking the “Set as default language” in the Transposh widget doesn’t cause anything. What I mean is:

    -The ajax animation doesn’t play (and thus the text doesn’t disappear) on my remote install. I have to click the link as to open it in a new tab in order to actually set the default language. Ajax animation does happen on local install.

    -Both remote and local installs are not affected by what I set as default language. For example, if I set Portuguese as the default in the widget, as soon as I close the page, it resets back to english. And this is with a logged in user.

    Any ideas on how to solve this?

    http://wordpress.org/extend/plugins/transposh-translation-filter-for-wordpress/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author oferwald

    (@oferwald)

    I’d guess it is some kind of jQuery conflict, but I need a site to see the problem directly.

    Thread Starter OttoRobba

    (@ottorobba)

    Hi Ofer,

    Sorry for the late reply.
    You can see the issue happening here: http://www.akademeia.org
    The Transposh widget is at the bottom. If you change from English to Portuguese and try setting it as default, you should see the error I’m getting.

    Thank you time and for looking at it 🙂

    Plugin Author oferwald

    (@oferwald)

    Hello Otto,

    Since transposh.js is not being included at all, this can’t work 🙂

    This is an omission on my side, you can fix it by either including the function yourself, or enabling auto-translate…

    I will add this to the todo

    Plugin Author oferwald

    (@oferwald)

    Try changing line 716 of transposh.php to:

    if (!($this->edit_mode || $this->is_auto_translate_permitted() || is_admin() || $this->options->get_widget_allow_set_default_language()))

    Thread Starter OttoRobba

    (@ottorobba)

    Thanks for the reply Ofer 🙂

    Changed the line as you said, that makes it work when translation editing is turned on but not when it is turned off. Which means that I can set portuguese as my account default if I activate editing but I can’t set back to english as the default as it is not editable xD

    PS: I don’t know php but If I understand the line correctly, it only work for admins?

    Plugin Author oferwald

    (@oferwald)

    Please try commenting out lines 716, 717

    This line means it should work when in edit mode, or when auto translation is permitted, or an admin is logged on (and I have tried adding the fact that a language is settable by user).

    Let me know if that helps

    Thread Starter OttoRobba

    (@ottorobba)

    Commenting out lines 716 and 717 has the same result as the first modification. In other words: nothing happens unless I’m editing the language, then I can set my default (but can’t set back due to english being the site’s default).

    Plugin Author oferwald

    (@oferwald)

    Oopps

    I missed lines 769 and 771, please try to comment them both out

    I also suggest returning 716 to what I suggested previously and uncommenting 717

    Sorry about the mess 🙂

    Thread Starter OttoRobba

    (@ottorobba)

    You call it a mess, I call it a process xD
    Really appreciatte your help mate 🙂

    That works for the ajax, now clicking set default gives the expected result. Only odd thing left is that if I close the page and open it back, it goes back to English, no matter which language I set as my default.

    Any clue on this one?

    Plugin Author oferwald

    (@oferwald)

    🙂

    Guess I need to explain this, the session is still alive meaning it will not redirect, otherwise you could have never switch to another language again.

    What you should try, close the browser (not just the tab) and then check what happens.

    I guess this behaviour is not the most trivial, but other behaviours might cause deadlocks in returning to the original language.

    You can probably change the code to force it, but I don’t recommend this

    Have fun,

    Thread Starter OttoRobba

    (@ottorobba)

    Hmm, ok, I think I understand it now. Tested like you said and indeed, the user default is preserved whenever I close the tab and then close the browser but not if I close the tab and open it anew.

    Would be nice if it saved for logged in users but I understand what you mean with the deadlocks and I as well would rather be safe than sorry. 🙂

    Thank you very much for all the help Ofer, great support, great plugin 🙂

    Marking this as solved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Transposh WordPress Translation] Can't set default language (widget)’ is closed to new replies.