Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
congratulations in advance for your module.
Any way to hide google top bar after translation?
I try with this simple javascript but without success.
document.write ("")
Comments
Comment #1
fr34ck CreditAttribution: fr34ck commentedOps,
this is the code:
document.write ("<input name=u value="+location.href+" type=hidden>")
Comment #2
blinkingtwelve CreditAttribution: blinkingtwelve commentedIt's a HTML frame (both the google top bar and the translated page are, actually), so that complicates things.
Furthermore that's not the way Google intends it to be so a hack like that may become disfunctional at any time - new version of this module every week ;-)
So I will probably not implement this. Still, if you find a neat way to hide it feel free to reopen this issue. If nothing else it's educational.
Comment #3
Soledad CreditAttribution: Soledad commentedthe important thing you have to get is the link :
example :
my blog is : http://engnajjar.blog.com/
If I translate it to Russian like this :
http://img101.imageshack.us/img101/1549/tr1j.jpg
and the link in the address is :
http://translate.google.com/translate?js=y&prev=_t&hl=en&ie=UTF-8&layout...
but after opening the home page in new tab through in the translated page
it will be opened and translated without the translate bar like this :
http://img6.imageshack.us/img6/4703/tr2yt.jpg
and the link is :
http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=en&...
after that you can use the last link
I wish that was useful
Comment #4
blinkingtwelve CreditAttribution: blinkingtwelve commentedThis link works as you describe, but if you leave out or modify the
usg=ALkJrhgNrEOIlrD-drYNftm4BVdBEnK1TA
parameter the top bar reappears. I suspect it's some kind of hash of the URL. If we find out how to determine appropriate values of theusg
parameter we might get somewhere.The previously mentioned concerns apply, of course. If we'd get it working it's not what Google intends and thus may break at any moment.