无论是Google Translate网站、Crow Translate或uTools的翻译插件,都是一次翻译一个语言,如果想要一次翻译多个语言,应该如何操作呢?
以下分享两个作法:

  1. 使用Google试算表
  2. 以AutoHotkey撰写整批操作的脚本

方法1. 使用Google试算表

使用Google试算表的GoogleTranslate函数即可轻松达成此需求。

=GoogleTranslate(儲存格, "來源語言代碼", "目的語言代碼")

 語言代碼: https://www.wikiwand.com/zh/ISO_639-1

title: 语言代码
https://www.wikiwand.com/zh/ISO_639-1

方法2. AutoHotkey脚本

^+t::
  InputBox, sText, Google翻译, 请输入要翻译的原文:, , 800, 150, , , , , %Clipboard%
  if (ErrorLevel == 0) {
    sSimplified := GoogleTranslate(sText, "zh-tw", "zh")
    sEnglish := GoogleTranslate(sText, "zh-tw", "en")
    sJapanese := GoogleTranslate(sText, "zh-tw", "ja")
    sKorean := GoogleTranslate(sText, "zh-tw", "ko")

    sContent := sSimplified . "`n`n" . sEnglish "`n`n" . sJapanese . "`n`n" . sKorean . "`n" 

    FileEncoding UTF-8-RAW
    FileDelete, c:\temp\_translate.txt
    FileAppend %sContent%, c:\temp\_translate.txt
    Run c:\temp\_translate.txt
  }
  return

相关链接

教学影片

##

0
0