Is it possible to auto-translate an Iframe with go

2019-08-06 01:40发布

问题:

I'd like to translate to french an iframe on my website automatically when users come to that page : http://www.julienlussiez.com/p/boutique.html

Is it possible?

Here's the code:

<iframe height="525px" scrolling="no" src="http://julienlussiez.bandcamp.com/album/fragile" width="950px"></iframe>

Thanks

回答1:

In general, I'd say just set the src of your iframe to this: http://translate.google.com/translate?hl=fr&sl=auto&tl=fr&u=BLANK

Where BLANK is the url of the website.

However, it doesn't seem to work for the website you're looking at, since Google thinks its already in French...



回答2:

(Oct 2014:) Google translate does not allow an iframe to be translated. They are happy to translate the complete window, though, and then the URL for your specific case could be something like:

http://www.google.com/translate?hl=fr&ie=UTF8&sl=en&tl=fr&u=http%3A%2F%2Fjulienlussiez.bandcamp.com%2Falbum%2Ffragile

sl means source language, so sl=en is a declaration that you believe the source is in English. tl means target language, so tl=fr means that you request a French translation. I believe that hl means human interface language, i.e. with that parameter you request and comments, buttons etc from google to be in a specific language. (French in this case).