Closed (fixed)
Project:
TranslateThis Button
Version:
6.x-1.1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Aug 2010 at 15:52 UTC
Updated:
2 Jan 2014 at 19:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
BarisW commentedHi Tim,
would you be so kind to check your HTML source?
It should add two links to two external Javascript files and a small piece of inline Javascript.
This:
And this (depending on your settings):
Do you see these lines? Or are they missing? Did you try flushing the cache?
Comment #2
twooten commentedHi BarisW,
I did check my source and all code is there. You can take a look for yourself at wootenswebdesign.com
I also flushed cache,
Thanks,
Tim
Comment #3
BarisW commentedHi Tim,
I'll have a look. I think the Javascript of the TranslateThis button is clashing with other Javascripts.
It' might me the External Links module. Or maybe the Google Analytics?
I'll let you know when I found out :)
Baris
Comment #4
BarisW commentedYep.. I found the error!
After I enabled the External Links module, the button stopped working.
I'll see if I can make both working together!
Comment #5
BarisW commentedNavigate to the External Links settings (admin/settings/extlink) and add
translateth\.isto the Pattern Matching > Exclude Links field.This will solve your problem.
I'll see if I can add the entry automatically in the next release.
Let me know if this works for you!
Comment #6
twooten commentedBarisW,
Nice, that was the problem. Thanks for the fix!
Tim
Comment #7
toma commentedI have the same error with my website http://biladi.ma
You can view my html source
Thanks
Comment #8
BarisW commentedHi toma,
I visited your site but the code is already gone. What is the code of the button?
In the first topic, the problem was External Links, but I don't see module on your website.
Would you please reactive the module on your website? And place the translate button somewhere below (in the footer), so other users won't mind?
Thanks!
Comment #9
toma commentedHi
I re active the module and add to the sport page in my website (right block) http://biladi.ma/sports
Thanks
Comment #10
BarisW commentedHi toma,
strange, I see the translate link as expected. However, I don't see the needed HTML added to the head of the page.
I really don't know the reason of this behavior.
Comment #11
vacilando commentedSame problem. Just a link to http://translateth.is/, no button.
One question: does this module provide the necessary JavaScript or is it calling it from elsewhere?
Thanks.
Comment #12
BarisW commentedThe module integrates the needed JavaScript from translateth.is (http://x.translateth.is/translate-this.js).
It seems that the translate function does not work pretty well with some javascript functions.
See: http://translateth.is/faq#breaks-javascript and #876194: Javascript (jQuery) doesn't work after translating for reference on this.
Comment #13
vacilando commentedThanks, but I am unwilling to even try it again if it depends on an external website. Why wouldn't you provide the necessary script in the module? :-(
Comment #14
BarisW commentedThat's not allowed due to Drupal 3rd party policy.
Comment #15
Anonymous (not verified) commentedI just started using this module and had the same problem as the OP: the fix from comment #5 worked for me.
Any chance this could be fixed automatically, rather than having to add this manually?
If not, could you perhaps put a notice on the project page about this?
Thanks!
Comment #16
Pieter Maes commentedHi there I've got a similar problem,
I also get the link and not the drop-down menu like you can see in the screen shot Tim posted.
The weird thing is that Firefox does display the drop-down menu.
IE and Google chrome display it either directly as a link or they display the drop-down menu once and as soon as you click an internal link that loads a sub-page of the site the drop-down menu disappears and you end up with the link for the rest of the time.
In the past i used the external link module but i removed it, now i re-installed it and added the fix like explained in comment #5 but it doesn't change anything.
I also like to say this to the developer:
I tried a lot of translation modules and i have to give you credit this is the best one I've tested ;).
Comment #17
BarisW commentedHi there, thanks for your comment.
I've looked at your site and for some strange reason I don't see the include for the translateth.is javascript file in your head. You should have something like this in your head tags:
Can you confirm that you have enabled the module and that the settings are correct? If possible, mail me the logins of your site so I can have a look.
Comment #18
Pieter Maes commentedHi there BarisW,
I asked permission to the site owner to give you access to the admin section but they have refused.
I've added a screen shot of the settings maybe you can see if i did something wrong.
Already thx for the fast reply.
Comment #19
BarisW commentedIt should be
translateth\.is, nottranslateth\.Comment #20
Pieter Maes commentedok thx i changed it but still the only browser that has no problem is Firefox.
IE and Google chrome still have the same issue.
If you are interested in finding the problem i can provide more info, just ask.
Comment #21
Pieter Maes commentedHi there every one and a specialy BarisW,
I added the code (from comment #17, changed the fromLang : 'en' to fromLang : 'nl') to my page.tpl.php in the theme i use. Now the button works with every browser. I hope this is usefull for anyone who has the same problem.
Thx for the pointer BarisW, have a verry nice day!!!
Comment #22
BarisW commentedHi there. Thanks for reporting back!
However, you shouldn't have to set the fromLang variable in the page.tpl.php - the module should do this for you and it can be defined in the admin interface of the module. Anyway: problem solved. Nice work!