2009年3月12日 星期四

opera右键之翻译

说明:相关图标我指定为无。
在自己的menu.ini中添加或修改。
一、网页的右键翻译:
[Document Popup Menu]
Submenu, 网页翻译, Page Translate Menu

[Page Translate Menu]
Item, "中文(Google)"="Go to page, "javascript:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.cn/translate_t?text='+t+'&hl=zh_cn&langpair=auto|zh-CN&tbb=1&ie='+e;}else{location.href='http://translate.google.cn/translate?u='+escape(location.href)+'&hl=zh_cn&langpair=auto|zh-CN&tbb=1&ie='+e;};", 1, , "no""
--------------------0
Item, 英 » 中(yahoo) = "Go to page, "http://babelfish.yahoo.com/translate_url?fr=bf-home&trurl=%u&lp=en_zh",,,"no""
Item, 中 » 英(yahoo) = "Go to page, "http://babelfish.yahoo.com/translate_url?fr=bf-home&trurl=%u&lp=zh_en",,,"no""
--------------------1
Item, 英 » 中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=en&tl=zh-CN",,,"no""
Item, 日 » 中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=ja&tl=zh-CN",,,"no""
Item, 韩 » 中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=ko&tl=zh-CN",,,"no""
Item, 俄 » 中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=ru&tl=zh-CN",,,"no""
Item, 法 » 中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=fr&tl=zh-CN",,,"no""
Item, 德 » 中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=de&tl=zh-CN",,,"no""
Item, 西班牙»中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=es&tl=zh-CN",,,"no""
Item, 意大利»中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=it&tl=zh-CN",,,"no""
Item, 葡萄牙»中(Google) = "Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=pt&tl=zh-CN",,,"no""
--------------------2
Item, "简 » 繁(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=zh-CN&tl=zh-TW",,,"no""
Item, "繁 » 简(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=zh-TW&tl=zh-CN",,,"no""
--------------------3
Item, "中 » 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=zh-CN&tl=en",,,"no""
Item, "日 » 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=ja&tl=en",,,"no""
Item, "韩 » 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=ko&tl=en",,,"no""
Item, "法 » 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=fr&tl=en",,,"no""
Item, "德 » 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=de&tl=en",,,"no""
Item, "意大利»英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=it&tl=en",,,"no""
Item, "葡萄牙»英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=pt&tl=en",,,"no""
Item, "俄 » 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=ru&tl=en",,,"no""
Item, "西班牙» 英(Google)"="Go to page, "http://translate.google.com/translate?prev=_t&hl=zh-CN&ie=UTF-8&u=%u&sl=es&tl=en",,,"no""


二、选中文字的右键翻译:
1、
[Hotclick Popup Menu]
Submenu, 翻译, Text Translate Menu

[Link Selection Popup Menu]
Submenu, 翻译, Text Translate Menu


[Text Translate Menu]
Item, "英汉词典(Dict.cn)"="Go to Page,"javascript:(function(){var s=encodeURIComponent(window.getSelection().toString());if(s.length>0){s='http://dict.cn/search/?utf8=true&q='+s;void open(s,'');}})()",,,"no""
--------------------0
Item, 英 » 中(yahoo) = "Go to page, "http://fanyi.cn.yahoo.com/translate_txt?ie=UTF-8&fr=bf-res&more=1&trtext=%t&lp=en_zh",,,"no""
Item, 中 » 英(yahoo) = "Go to page, "http://fanyi.cn.yahoo.com/translate_txt?ie=UTF-8&fr=bf-res&more=1&trtext=%t&lp=zh_en",,,"no""
Item, 繁 » 简(yahoo) = "Go to page, "http://fanyi.cn.yahoo.com/translate_txt?ie=UTF-8&fr=bf-res&more=1&trtext=%t&lp=zt_zh",,,"no""
Item, 简 » 繁(yahoo) = "Go to page, "http://fanyi.cn.yahoo.com/translate_txt?ie=UTF-8&fr=bf-res&more=1&trtext=%t&lp=zh_zt",,,"no""
--------------------1
Item, 英 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#en|zh-CN|%t",,,"no""
Item, 日 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#ja|zh-CN|%t",,,"no""
Item, 韩 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#ko|zh-CN|%t",,,"no""
Item, 俄 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#ru|zh-CN|%t",,,"no""
Item, 法 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#fr|zh-CN|%t",,,"no""
Item, 德 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#de|zh-CN|%t",,,"no""
Item, 西班牙 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#es|zh-CN|%t",,,"no""
Item, 意大利 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#it|zh-CN|%t",,,"no""
Item, 葡萄牙 » 中(Google) = "Go to page, "http://translate.google.com/translate_t#pt|zh-CN|%t",,,"no""
--------------------2
Item, 简 » 繁(Google) = "Go to page, "http://translate.google.com/translate_t#zh-CN|zh-TW|%t",,,"no""
Item, 繁 » 简(Google) = "Go to page, "http://translate.google.com/translate_t#zh-TW|zh-CN|%t",,,"no""
--------------------3
Item, "中 » 英(Google)"="Go to page, "http://translate.google.com/translate_t#zh-CN|en|%t",,,"no""
Item, "日 » 英(Google)"="Go to page, "http://translate.google.com/translate_t#ja|en|%t",,,"no""
Item, "韩 » 英(Google)"="Go to page, "http://translate.google.com/translate_t#ko|en|%t",,,"no""
Item, "法 » 英(Google)"="Go to page, "http://translate.google.com/translate_t#fr|en|%t",,,"no""
Item, "德 » 英(Google)"="Go to page, "http://translate.google.com/translate_t#de|en|%t",,,"no""
Item, "意大利» 英(Google)"="Go to page, "http://translate.google.com/translate_t#it|en|%t",,,"no""
Item, "葡萄牙» 英(Google)"="Go to page, "http://translate.google.com/translate_t#pt|en|%t",,,"no""
Item, "俄 » 英(Google)"="Go to page, "http://translate.google.com/translate_t#ru|en|%t",,,"no""
Item, "西班牙» 英(Google)"="Go to page, "http://translate.google.com/translate_t#es|en|%t",,,"no""


2、配合JS文件使用,适用于选中文字的右键翻译。
原出自Alexey Ruzanov的俄罗斯版opera AC,修改右键以适合中国用户。
JS文件:http://lexi.ucoz.ru/userjs/google-translate.js

Item, 英 » 中="Go to Page, "javascript:ujs_google_translate('en|zh')",,,"no""
Item, 法 » 中="Go to Page, "javascript:ujs_google_translate('fr|zh')",,,"no""
Item, 德 » 中="Go to Page, "javascript:ujs_google_translate('de|zh')",,,"no""
Item, 俄 » 中="Go to Page, "javascript:ujs_google_translate('ru|zh')",,,"no""
Item, 意 » 中="Go to Page, "javascript:ujs_google_translate('it|zh')",,,"no""
Item, 葡 » 中="Go to Page, "javascript:ujs_google_translate('pt|zh')",,,"no""
Item, 西 » 中="Go to Page, "javascript:ujs_google_translate('es|zh')",,,"no""
Item, 日 » 中="Go to Page, "javascript:ujs_google_translate('ja|zh')",,,"no""
Item, 韩 » 中="Go to Page, "javascript:ujs_google_translate('ko|zh')",,,"no""
--------------------1
Item, 中 » 英="Go to Page, "javascript:ujs_google_translate('zh|en')",,,"no""
Item, 中 » 日="Go to Page, "javascript:ujs_google_translate('zh|ja')",,,"no""

1 评论:

匿名 说...

能不能在右键菜单中加入,一个快速保存图片的?就是对图片点右键,显示“保存到文件夹1”“保存到文件夹2”……,现有的方法只能是“保存到下载文件夹”,可是下载文件夹只有1个啊……

或者也可以点右键的时候执行两步,第一步先设置下载文件夹,第二步保存到现在文件夹,不知道可不可行?