taglife
千年狐狸
千年狐狸
  • UID38488
  • 注册日期2012-03-20
  • 最后登录2013-04-02
  • 发帖数2052
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度1点
阅读:6624回复:8

Google 全文翻譯 https 網頁

楼主#
更多 发布于:2012-08-12 17:34
Google 如何全文翻譯 https 的網頁?
試了一個 gTranslator :: Firefox 附加元件 卻可以翻譯 https 的網頁,它是如何辦到的?
小書籤工具可以翻譯 https 的網頁嗎?
Firefox 開啟安全模式,停用個人設定、佈景主題及擴充套件(無附加元件)測試:
說明 > 重新啟動但停用附加元件(Firefox 4+)
Firefox Profile: 說明 > 疑難排解資訊 > 開啟資料夾
排版引擎:Firefox(Gecko), Opera(Presto), Google Chrome(WebKit),
Safari(WebKit), Internet Explorer(Trident), Konqueror(KHTML)
xcffl
火狐狸
火狐狸
  • UID37199
  • 注册日期2011-09-09
  • 最后登录2020-04-13
  • 发帖数206
  • 经验163枚
  • 威望1点
  • 贡献值50点
  • 好评度36点
  • 社区居民
  • 忠实会员
1楼#
发布于:2012-08-12 17:34
小书签
javascript:{d=document;b=d.body;o=d.createElement('scri'+'pt');o.setAttribute('src','http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit');o.setAttribute('type','text/javascript');b.appendChild(o);v=b.insertBefore(d.createElement('div'),b.firstChild);v.id='google_translate_element';v.style.display='none';p=d.createElement('scri'+'pt');p.text='function%20googleTranslateElementInit(){new%20google.translate.TranslateElement({pageLanguage:%22%22},%22google_translate_element%22);}';p.setAttribute('type','text/javascript');b.appendChild(p);}void%200
taglife
千年狐狸
千年狐狸
  • UID38488
  • 注册日期2012-03-20
  • 最后登录2013-04-02
  • 发帖数2052
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度1点
2楼#
发布于:2012-08-12 17:34
xcffl:...回到原帖

1. 請問這個有來源嗎?
2. 能自動翻譯成固定語言嗎(清除歷史記錄)?
3. Flashblock 和 NoScript 的阻擋該如何克服?
     

4. 這個小書籤為什麼就不能適用 https?
javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/?text='+t+'&hl=zh-TW&langpair=auto|zh-TW&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=zh-TW&langpair=auto|zh-TW&tbb=1&ie='+e;}
Firefox 開啟安全模式,停用個人設定、佈景主題及擴充套件(無附加元件)測試:
說明 > 重新啟動但停用附加元件(Firefox 4+)
Firefox Profile: 說明 > 疑難排解資訊 > 開啟資料夾
排版引擎:Firefox(Gecko), Opera(Presto), Google Chrome(WebKit),
Safari(WebKit), Internet Explorer(Trident), Konqueror(KHTML)
gd1988
小狐狸
小狐狸
  • UID31888
  • 注册日期2010-01-31
  • 最后登录2017-04-22
  • 发帖数51
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度1点
3楼#
发布于:2012-08-12 17:34
2L的 不错  借此问下   如何借手势FireGestures  比如向下  调用2L书签在当前页打开   (额 我原先试了个笨办法
把2L的书签设置成主页  再用手势打开...成功了...但不怎么用的习惯  主页我要设置其他的网址)哪位大神可以帮忙 弄个FireGestures脚本 调用2L哪个书签  谢谢了
xcffl
火狐狸
火狐狸
  • UID37199
  • 注册日期2011-09-09
  • 最后登录2020-04-13
  • 发帖数206
  • 经验163枚
  • 威望1点
  • 贡献值50点
  • 好评度36点
  • 社区居民
  • 忠实会员
4楼#
发布于:2012-08-12 17:34
taglife
1. 請問這個有來源嗎?
2. 能自能翻譯成固定語言嗎(清除歷史記錄)?
3. Flashblock 和 NoScript 的阻擋該如何克服?
     

4. 這個小書籤為什麼就不能適用 https?
javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/?text='+t+'&hl=zh-TW&langpair=auto|zh-TW&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=zh-TW&langpair=auto|zh-TW&tbb=1&ie='+e;}
回到原帖


才发现这个论坛居然没有回复提醒。。。
1.有来源,网上找到的,一直在用,但不知道究竟是那里。
2.能,Google是什么语言,它就是什么语言。
3.这个不能克服把?都把它阻挡掉了,肯定就失效了。那两个扩展没用过。除非有白名单,排除translate.googleapis.com和translate.google.com。
4.我那个是当前页面直接把文字传上去,翻译后替换。你这个是直接通过嵌入网页翻译,也就相当于直接在谷歌翻译里面输入网址回车的那种。可能技术上没法弄吧。具体的不懂。
MalcKear
千年狐狸
千年狐狸
  • UID35386
  • 注册日期2011-03-05
  • 最后登录2020-03-02
  • 发帖数1348
  • 经验131枚
  • 威望0点
  • 贡献值16点
  • 好评度10点
  • 社区居民
  • 忠实会员
5楼#
发布于:2012-08-12 17:34
taglife:Google 如何全文翻譯 https 的網頁?
試了一個 gTranslator :: Firefox 附加元件 卻可以翻譯 https 的網頁,它是如何辦到的?
小書籤工具可以翻譯 https 的網頁嗎?
回到原帖

微软翻译
javascript:(function(){var%20s%20=%20document.createElement('script');%20s.type%20=%20'text/javascript';%20s.src%20=%20'http://labs.microsofttranslator.com/bookmarklet/default.aspx?f=js&to=zh-chs';%20document.body.insertBefore(s,%20document.body.firstChild);})()

谷歌翻译
javascript:{d=document;b=d.body;o=d.createElement('scri'+'pt');o.setAttribute('src','http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit');o.setAttribute('type','text/javascript');b.appendChild(o);v=b.insertBefore(d.createElement('div'),b.firstChild);v.id='google_translate_element';v.style.display='none';p=d.createElement('scri'+'pt');p.text='function%20googleTranslateElementInit(){new%20google.translate.TranslateElement({pageLanguage:%22%22},%22google_translate_element%22);}';p.setAttribute('type','text/javascript');b.appendChild(p);}void%200

有道翻译
javascript:%20void((function()%20{var%20element%20=%20document.createElement('script');element.id%20=%20'outfox_seed_js';element.charset%20=%20'utf-8',element.setAttribute('src',%20'http://fanyi.youdao.com/web2/seed.js?'%20+%20Date.parse(new%20Date()));document.body.appendChild(element);})())
taglife
千年狐狸
千年狐狸
  • UID38488
  • 注册日期2012-03-20
  • 最后登录2013-04-02
  • 发帖数2052
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度1点
6楼#
发布于:2012-08-12 17:34
貌似 微软 和 谷歌 翻译必須允許翻譯頁面的 JavaScript...
而 有道翻译 卻不用...

允許 JavaScript:
microsofttranslator.com
youdao.com

谷歌 允許 Flash:
translate.googleapis.com
Firefox 開啟安全模式,停用個人設定、佈景主題及擴充套件(無附加元件)測試:
說明 > 重新啟動但停用附加元件(Firefox 4+)
Firefox Profile: 說明 > 疑難排解資訊 > 開啟資料夾
排版引擎:Firefox(Gecko), Opera(Presto), Google Chrome(WebKit),
Safari(WebKit), Internet Explorer(Trident), Konqueror(KHTML)
yucuoyufen
狐狸大王
狐狸大王
  • UID23974
  • 注册日期2008-05-03
  • 最后登录2024-03-04
  • 发帖数346
  • 经验138枚
  • 威望0点
  • 贡献值84点
  • 好评度1点
  • 社区居民
  • 忠实会员
7楼#
发布于:2012-08-12 17:34
var t = content.getSelection().toString();
if(t) {gBrowser.addTab("http://translate.google.cn/translate_t?hl=en#auto|zh-CN|"+t);}
else {gBrowser.addTab("http://translate.google.cn/translate?u="+content.location+"&hl=zh_CN&ie=UTF-8&sl=auto&tl=zh_CN");}

用FireGestures鼠标手势比较方便,网页以外,左键划选还可以定句、定词。选项-映射-添加脚本-设定动作
yikesi69
火狐狸
火狐狸
  • UID31191
  • 注册日期2009-11-25
  • 最后登录2019-07-02
  • 发帖数187
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
8楼#
发布于:2012-08-12 17:34
找了好久的东西,学习了
我回来了

返回顶部