Conflict between Google Translate widget and Firefox Flashblock extension

The Google Translate widget allows webmasters to add on-demand translation of a website page. Very easy to configure and deploy.

The rendered widget appears in the browser as a simple select dropdown with options for all the language supported by Google Translate. When the user selects his desired target language, the widget is supposed to contact the Google Translate mother ship, translate the text on the page, and then add an fixed iframe panel at the top of the browser viewport, followed by the translation of the page. The translated page even implements onmouseover handlers for text-based elements that display the original source text. Sweet.

It has worked great for me in the past. But I recently did a new deployment and I was unable to get the widget to work. When I (as the user) selected my target language, I got the following:

Error: The server could not complete your request. Try again later.

A bit more poking showed that it was only happening in Firefox. All my other browsers were ok. Eventually, I narrowed it down to a conflict with the Flashblock extension. Disabling the extension solved the problem.

Now, the tough choice is to run without the Flashblock or without the Google Translate. But at least I can deploy for the customer.

2010-02-20 Update: The mere presence of the enabled Flashblock extension when visiting a page with the translate widget does not cause the problem. The issue only occurs when the page has Flash content and the extension is configured to block Flash on that page.

The reason: The widget appears to actually use Flash!

In the file

http://translate.googleapis.com/translate_static/js/element/main.js

the function wf() seems to add Flash embed code into the page. I imagine that Flashblock is detecting this attempted insertion and is doing its magic.

I actually find it interesting - and impressive - that the Flashblock extension is smart enough to not only find/block Flash content on initial page load, but also at any time after that. I imagine it monitors the DOM and is vigilantly swaps out any Flash embeddings with its own replacement button.

I can see that the widget creates several iframes, at least one of which has Flash content pulled from the domain translate.googleapis.com. It stands to reason - well, at least to me - that enabling Flash content for this domain should do the trick. But so far, no luck. ;-(

8 comments so far »

  1. techandlife said,

    Wrote on February 20, 2010 @ 4:55 am

    Yes I’ve just installed Google Translate and ran into the same problem in Firefox. Disabling Flashblock solved it. Thanks for your post about this.
    As you say, do I now remove Google Translate as it’s going to affect people running the Flashblock extension. I think on balance I’ll leave it in the hope that people coming to my site with Firefox browser and Flashblock and wanting a translation are in a minority.

  2. david said,

    Wrote on February 20, 2010 @ 6:51 am

    @techandlife: Yeah, I made the same choice.

  3. Becheru Petru-Ioan said,

    Wrote on February 21, 2010 @ 6:01 pm

    I thought that linux was the cause of “google translate” not working. Disabling flashblock enables Google translate widget to work

    Note: this is also true for Google Chrome browser, not only Firefox.

  4. david said,

    Wrote on February 21, 2010 @ 6:40 pm

    @Becheru:

    Makes sense that it would affect the Flashblock extension in Chrome, too.

    In fact, since the Google Translate widget itself seems to use some flash embedding under the hood, as I noted in the update, it seems almost certain that any flashblock functionality in any browser that monitors the DOM for a flash embedding is going to block the translate widget. ;-(

  5. Philip said,

    Wrote on March 28, 2010 @ 9:44 pm

    You don’t have to disable Flashblock to make Goggle Translate to work, all you have to do is to add the address for which server the translate feature is used on.

  6. david said,

    Wrote on March 28, 2010 @ 10:22 pm

    @Philip:

    Yeah, totally makes sense. But I just couldn’t get it to work with the obvious server choices. If you have some specific instructions, I’d love to hear it.

    Thanks! ;-)

  7. Philip said,

    Wrote on March 28, 2010 @ 10:49 pm

    If the translate feature is on http://www.yoursite.com you should add http://www.yoursite.com to the whitelist.

  8. david said,

    Wrote on March 29, 2010 @ 7:34 am

    @Philip: Of course, I thought the same thing. But trying to enable obvious servers like google.com and translate.,google.com didn’t work for me. I tried to monitor the http traffic - using a the Live HTTP Headers extension - to see if there was perhaps some other server in there being used, but never came up with one that worked. I might try again to get back into it. Thanks and cheers,

One pingback/trackback so far »

  1. 100th post: Recent changes to Tech and Life | Tech and life said,

    Wrote on February 20, 2010 @ 11:49 pm

    [...] blog translation before. I had some problems getting it to translate to other languages and discovered that the Firefox extension Flashblock causes a conflict with Google Translate. Disabling the extension solved the problem. So if you’re using Google Translate and getting [...]

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: