When I installed and turned on this module I placed it in the left region but all I get is a link to http://translateth.is/. I've tried in both Acquia Marina and Garland themes

What am i missing?

Attached screenshot.

Thanks,
Tim

CommentFileSizeAuthor
#18 external-links.png46.27 KBPieter Maes
Screenshot.png5.68 KBtwooten

Comments

BarisW’s picture

Hi 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:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js"></script>

And this (depending on your settings):

<script type="text/javascript">
<!--//--><![CDATA[//><!--
TranslateThis({
    undoText : 'Undo »',
    panelText : 'Translate this',
    moreText : '36 more languages »',
    busyText : 'Translating page…',
    cancelText : 'cancel',
    fromLang : 'en'
});
//--><!]]>
</script>

Do you see these lines? Or are they missing? Did you try flushing the cache?

twooten’s picture

Hi 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

BarisW’s picture

Hi 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

BarisW’s picture

Yep.. 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!

BarisW’s picture

Status: Active » Needs review

Navigate to the External Links settings (admin/settings/extlink) and add translateth\.is to 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!

twooten’s picture

BarisW,

Nice, that was the problem. Thanks for the fix!

Tim

toma’s picture

I have the same error with my website http://biladi.ma

You can view my html source

<script type="text/javascript" src="/misc/jquery.js?b"></script>
<script type="text/javascript" src="/misc/drupal.js?b"></script>
<script type="text/javascript" src="/misc/collapse.js?b"></script>

<script type="text/javascript" src="/sites/default/files/languages/fr_62aca0837234f7107edb6964d9f8d6ae.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/insertFrame/insertFrame.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/superfish/js/jquery.hoverIntent.minified.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/superfish/js/jquery.bgiframe.min.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/superfish/js/superfish.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/superfish/js/supersubs.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/panels/js/panels.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/quran/ichsan-tooltip.js?b"></script>
<script type="text/javascript" src="/sites/all/modules/views/js/base.js?b"></script>

<script type="text/javascript" src="/sites/all/modules/views/js/ajax_view.js?b"></script>
<script type="text/javascript" src="/sites/all/themes/openpublish_theme/script.js?b"></script>
<script type="text/javascript" src="/sites/all/themes/openpublish_theme/js/DD_belatedPNG.js?b"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/", "CTools": { "pageId": "page-e1c8ef2eec1a65c03e73873b20000984" }, "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" }, "views": { "ajax_path": "/views/ajax", "ajaxViews": [ { "view_name": "buzz", "view_display_id": "block_1", "view_args": "", "view_path": "node", "view_base_path": "buzz/nouveau", "view_dom_id": 5, "pager_element": 0 } ] } });
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
TranslateThis({
    undoText : 'Undo »',
panelText : 'Translate into:',
moreText : '36 more languages »',
busyText : 'Translating page…',
cancelText : 'cancel',
fromLang : 'fr'
  });
//--><!]]>
</script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
$(document).ready(function(){
 $('ul#superfish-1').superfish({
 pathClass: 'active-trail',
 delay: 1000,

 speed: 'normal',
 autoArrows: false,
 dropShadows: false
}).find('ul').bgIframe({opacity:false});
});
//--><!]]>
</script>

Thanks

BarisW’s picture

Hi 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!

toma’s picture

Hi

I re active the module and add to the sport page in my website (right block) http://biladi.ma/sports

Thanks

BarisW’s picture

Hi 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.

vacilando’s picture

Same 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.

BarisW’s picture

The 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.

vacilando’s picture

Thanks, 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? :-(

BarisW’s picture

Status: Needs review » Closed (works as designed)

That's not allowed due to Drupal 3rd party policy.

Anonymous’s picture

Version: 6.x-1.0 » 6.x-1.1
Status: Closed (works as designed) » Active

I 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!

Pieter Maes’s picture

Status: Closed (fixed) » Active

Hi 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 ;).

BarisW’s picture

Hi 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:

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js"></script>
<script type="text/javascript">
        new TranslateThis({
            GA : true,
            fromLang : 'en'
        });
</script>

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.

Pieter Maes’s picture

StatusFileSize
new46.27 KB

Hi 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.

BarisW’s picture

It should be translateth\.is, not translateth\.

Pieter Maes’s picture

ok 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.

Pieter Maes’s picture

Hi 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!!!

BarisW’s picture

Status: Active » Fixed

Hi 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!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status: Active » Closed (fixed)