【问题标题】:Is it possible to auto-translate an Iframe with google translation?是否可以使用谷歌翻译自动翻译 iframe?
【发布时间】:2013-03-25 18:51:42
【问题描述】:

当用户访问该页面时,我想在我的网站上自动将 iframe 翻译成法语:http://www.julienlussiez.com/p/boutique.html

有可能吗?

代码如下:

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

谢谢

【问题讨论】:

    标签: iframe translation


    【解决方案1】:

    一般来说,我会说只需将 iframe 的 src 设置为:http://translate.google.com/translate?hl=fr&sl=auto&tl=fr&u=BLANK

    其中 BLANK 是网站的 url。

    但是,它似乎不适用于您正在查看的网站,因为 Google 认为它已经是法语...

    【讨论】:

    • 任何其他只翻译 iframe 内容的插件?
    【解决方案2】:

    (2014 年 10 月:)谷歌翻译不允许翻译 iframe。不过,他们很乐意翻译完整的窗口,然后您的具体案例的 URL 可能类似于:

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

    sl 表示源语言,因此 sl=en 是您认为源是英文的声明。 tl 表示目标语言,因此 tl=fr 表示您请求法语翻译。 我相信 hl 表示人机界面语言,即使用您请求的参数以及来自谷歌的 cmets、按钮等以特定语言。 (在这种情况下是法语)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-31
      • 1970-01-01
      • 2011-12-26
      相关资源
      最近更新 更多