/SublimeText-Google-Translate-Plugin

Google translate plugin for SublimeText 2 & 3

Primary LanguagePython

Replacement "Inline Google Translate" ... QTranslate?

Sadly it looks like Google Translate (a.k.a. "Inline Google Translate") for Sublime Text no longer works. I've scanned most of the forks of the original repo and it looks like no one has a version working as of 08/2022 ... so until/unless I find someone w/a working version it looks like the plugin is dead.

Good news is that a 3rd party tool called "QTranslate" is almost as good. Once you install it and configure the hotkey for "translate selected text" you can translate text in Sublime Text (or any editor) with the press of a button. You do have to set the default target language in QTranslate first but not that big a pain. Anyhow - just FYI for anyone else in same boat as me who needed something here ...

(appears free, so far...)

Sublime Text Google Translate Plugin (RIP)

For SublimeText 2 & 3, support proxy PROXY_TYPE_SOCKS5 PROXY_TYPE_SOCKS4 PROXY_TYPE_HTTP

Version: 2.1.0

Sublime Text Google Translate Plugin

Install:

[Recommend] Package Control: Usage, Package Control: Install Package then search Inline Google Translate

Without Git: Download the latest source from GitHub and copy the GoogleTranslate folder to your Sublime Text "Packages" directory.

With Git: Clone the repository in your Sublime Text "Packages" directory:

git clone https://github.com/MTimer/SublimeText-Google-Translate-Plugin 'Inline Google Translate'

Folder name must be Inline Google Translate !!

The "Packages" directory is located at:

  • OS X:

      ST2: ~/Library/Application Support/Sublime Text 2/Packages/
      ST3: ~/Library/Application Support/Sublime Text 3/Packages/
    
  • Linux:

      ST2: ~/.config/sublime-text-2/Packages/
      ST3: ~/.config/sublime-text-3/Packages/
    
  • Windows:

      ST2: %APPDATA%/Sublime Text 2/Packages/
      ST3: %APPDATA%/Sublime Text 3/Packages/
    

Configure:

Set Target Language AND Source Language [default is auto detect] in user settings:

{     
    "source_language": "", // eg. en, default is 'auto detect'
    "target_language": "", // default is en
    "target_type": "html",  // or plain or html
    "proxy_enable": "yes",  // enable or disable proxy
    "proxy_type": "socks5", // socks4 or socks5 or http
    "proxy_host": "127.0.0.1",  // eg. 127.0.0.1
    "proxy_port": "9050"    // eg. 9050
}

Usage:

Select text:

  • press ctrl+alt+g or select Google Translate seclected text in context menu

Tips:

Overview your language code:

  • press Google Translate Print the available translate variants in context menu
  • press ctrl + ~ to see output errors in console

Features:

  • Support proxy! F*K GFW !
  • 80 languages support!
  • SublimeText 2 & 3 support!
  • Autodetect source language!
  • Ability to specify source language & target language!
  • Ability to choose the target language in context menu
  • Ability to choose output type, 'plain' or 'html'
  • Ability to specify proxy type, proxy host, proxy port
  • Fixed Google Translate output errors
  • Implemented translation of multiple selection [Ctrl]!

Credits:

License:

MIT


Sublime Text Google 翻译插件

SublimeText Google 翻译插件 支持 ST 2 和 3,支持各种代理!GFW 你逼我的!

@更多优秀项目 下载插件中文版

当前版本: 2.1.0


安装:

[推荐] Package Control: 使用方法, Package Control: Install Package 然后搜索 Inline Google Translate

不用 Git:GitHub 下载 GoogleTranslate 文件复制到 Sublime Text "程序包" 目录。

手动 Git: 克隆到 Sublime Text "程序包" 目录:

git clone https://github.com/MTimer/SublimeText-Google-Translate-Plugin 'Inline Google Translate'

目录名必须为 Inline Google Translate !!

插件将位于 "程序包" 目录:

  • OS X:

      ST2: ~/Library/Application Support/Sublime Text 2/Packages/
      ST3: ~/Library/Application Support/Sublime Text 3/Packages/
    
  • Linux:

      ST2: ~/.config/sublime-text-2/Packages/
      ST3: ~/.config/sublime-text-3/Packages/
    
  • Windows:

      ST2: %APPDATA%/Sublime Text 2/Packages/
      ST3: %APPDATA%/Sublime Text 3/Packages/
    

设置:

从 source_language 翻译到 target_language,你可以在 ST 中设置:

{     
    "source_language": "", // 默认是 '自动检测'
    "target_language": "", // 默认是 en  英文
    "target_type": "html",  // 输出格式,plain 或者 html 格式
    "proxy_enable": "yes",  // 开启或关闭代理
    "proxy_type": "socks5", // socks4 或者 socks5 或者 http
    "proxy_host": "127.0.0.1",  // 比如 127.0.0.1
    "proxy_port": "9050"    // 比如 9050
}

用法:

鼠标划选需要翻译的内容,可以多选:

  • ctrl+alt+g 或者右键面板中选择 Google Translate seclected text

技巧:

查看你的语言代码:

  • 在右键面板中点击 Google Translate Print the available translate variants
  • ctrl+~ 在控制台查看输出错误

功能:

  • 支持各种代理! F*K GFW !
  • 支持 80 种语言互相转换翻译!
  • 支持 SublimeText 2 & 3!
  • 自动监测 source language!
  • 可以指定 source language & target language!
  • 可以右键选择需要翻译成的语言
  • 可以设置代理服务器类型、地址、端口
  • 可以选择输出类型, 'plain' 或 'html'
  • 修复 Google 输出的 html 标签错误
  • 可以多划选翻译 [Ctrl]!

感谢:

版权:

MIT