Google Translate Page Shift Oddity
Hi,
I am working on a commercial site for a client at present. Ideally, he wants a multi-language site, but is prepared to do things 'properly' as a Phase 2 devt. Hence, English first.
However, he's keen to offer "Google Translate" (GT) as an interim solution. I don't particularly like it as it destroys the text positioning and makes the site look a bit of a mess but he is the client and thus...
Anyway, I have noticed an odd effect. I position my page on the background at particular pixel settings but once GT is displayed the whole page 'shifts' down and to the right.
I've proved this by taking GT out and republishing. No problem. It also doesn't seem to matter where the GT placeholder is placed on the page...
Example is available here
I wonder has anybody else had this issue and found a way round it?
Here's hoping!
Regards
TD
Re: Google Translate Page Shift Oddity
Google reprocess your page and renders it accordingly, text is contained in precise <spans> if the new language requires more character space then is has to overflow.
The only alternative I can offer which might help is to use the HTMLBlockText name on your text areas.
See section 5:
►http://www.talkgraphics.com/showthread.php?t=45105
Re: Google Translate Page Shift Oddity
Hi Sledger, or may I call you Steve?
firstly, thank you for replying. Yes, I had a look through TG for previous Google Translate issues and found this thread.
However, my problem isn't related to displaying translated text. It's to do with the page being repositioned when the Google Translate widget is displayed on the page. No text translation has actually been done at that point.
I had a think about it and wondered if;
a) there was some issue with the way I had used the placeholder, or
b) Google Translate somehow 'wraps' your HTML in order that the translation process can take place when requested. That might explain why the page appears to 'shift'.
This isn't a huge problem. It just looks odd.
If you watch closely when you display the page referenced in my previous post, you will see it starts positioned very close to the top of the browser window. Then as the Google Translate widget is displayed the whole page shifts down and to the right by maybe 20px. Almost as if something is making the overall page size a little bigger - hence, the 'wrapper' theory.
If Google is doing this, then I'll have no choice but to live with it or not use the widget. However, if it's something I'm in control of - I'd love to fix it.
Any assistance you can offer would be gratefully received.
Best Regards
TD
Re: Google Translate Page Shift Oddity
Steve is fine..
OK, yes my mistake I see what you mean now.
Can you supply your file please?
EDIT: Cancel that. John has explained
Re: Google Translate Page Shift Oddity
Yes, I'm afraid this effect is made by the Google script. You have no control over it as it is located on their server. It may be changed in future and produce some different effects, or even hijack the page (I doubt Google will do this but with this snippet added they certainly have the capability). So this technique is generally not safe.
Re: Google Translate Page Shift Oddity
Thanks Guys!
I really appreciate your help with this. You have just saved me a lot of time searching this out for myself on the www.
I guess I'll have to live with it or maybe my client will change his mind... Hmmmm
:-O
Keep up the great work on TG!
Very Best Regards
TD