I'm using Google Translate tools to translate a web page and I also have an iframe on this page, that is not obviously translated with the page.
Is there a workaround, that any of you know, so I can have the iframe translated as well?
I'm using Google Translate tools to translate a web page and I also have an iframe on this page, that is not obviously translated with the page.
Is there a workaround, that any of you know, so I can have the iframe translated as well?
This is a genuine limitation or policy of Google Translate. You can't rewrite iframe content. But one thing you can do is change iframe
url to translated page like:
<iframe height="1200" width="600" src="http://translate.google.com/translate?hl=bg&ie=UTF-8&u=YOUR_IFRAME_URL&sl=de&tl=bg" align="middle" border="0">
If you need to translate the page with iframes, you can:
1. Use Bing Translator, that proxyfies request, so it wouldn't be cross domain.
site:
https://www.bing.com/translator
plugin that uses it (not tested):
https://chrome.google.com/webstore/detail/translator/blndkmebkmenignoajhoemebccmmfjib
2. You can run your browser (if it's Chrome) with --disable-web-security
param, so it would allow access to frames from other domains.
Please note that it's dangerous and should only be used on trusted sites.
$("#id_of_empty_iframe").load("http://translate.google.com/translate?hl=bg&ie=UTF-8&u=YOUR_IFRAME_URL&sl=de&tl=bg");
You could create a layer and put the translator code in it and put the layer top
-500
so it hides the layer off the page with the Google dropdown selector in it.
© 2022 - 2024 — McMap. All rights reserved.