Google 翻訳 ブックマークレット

Google の翻訳を使うブックマークレット
Firefox で使っています。(登録するときは改行を消してください。)

  • Google Web Page 翻訳 英日
    英語の Web Page を日本語に翻訳します。
javascript:f();function f(){
window.open('http://translate.google.com/translate?hl=ja&sl=en&u=
'+escape(document.location));}


  • Google Web Page 翻訳 日英
    日本語の Web Page を英語に翻訳します。
javascript:f();function f(){
window.open('http://translate.google.com/translate?hl=en&sl=ja&u=
'+escape(document.location));}


  • Google Text 翻訳 英日
    選択した英文を日本語に翻訳。文章を選択しないとプロンプトが出るのでそこに入力します。
javascript:f('Google Translate Text 英日',
'http://translate.google.com/','translate_t?hl=en&ie=UTF8&langpair=en|ja&text=','');
function f(m,p,v,a){
q=document.getSelection();if(!q)q=prompt(m,'');window.open(p+(q?v+encodeURI(q):a));}


  • Google Text 翻訳 日英
    選択した日本語を英文に翻訳。文章を選択しないとプロンプトが出るのでそこに入力します。
javascript:f('Google Translate Text 日英',
'http://translate.google.com/','translate_t?hl=en&ie=UTF8&langpair=ja|en&text=','');
function f(m,p,v,a){
q=document.getSelection();if(!q)q=prompt(m,'');window.open(p+(q?v+encodeURI(q):a));}