软件开发定制各位大佬们,软件开发定制别说不可以了,软件开发定制是你自己搞不定。请解压后,软件开发定制管理员运行。
20221107更新
国内的360,QQ等大部分浏览器由于都是使用的谷歌翻译,所以本方法对绝大部分浏览器都有效。
https://wws.lanzoub.com/b00w5kbti
值得一提的是,软件支持不仅支持 Windows,还提供了对 Mac,Linux 的支持,操作是一样的。
由于 Github 下载速度实在太慢,一旦发现 Chrome 右键翻译失效,只需要再运行一次就好了
// 旧方法失效
9月30日发现 Chrome 的右键网页翻译突然失效了,遇到其他语言的网站,Chrome 右键的网页翻译真乃神器。
然而国庆假期都要结束了,翻译服务仍然不能正常使用。具体如下图:
原来,Google 发言人称因“使用率太低”谷歌翻译服务已正式退出中国。
这就导致了两个问题:
- Chrome 浏览器的右键网页翻译功能无法使用,同时受影响的还有国内大部分套壳浏览器。
- translate.google.cn 已废弃,不再可用。
一步恢复 Chrome 右键网页翻译功能。
新建一个,内容如下:
:: Copyright (c)2022 https://bookfere.com:: This is a batch script for fixing Google Translate and making it available:: in the Chinese mainland. If you experience any problem, visit the page below::: https://bookfere.com/post/1020.html@setlocal enabledelayedexpansion@echo offset "source_domain=google.cn"set "target_domain=translate.googleapis.com"set "hosts_file=C:\Windows\System32\drivers\etc\hosts"for /f "skip=4 tokens=2" %%a in ('"nslookup %source_domain% 2>NUL"') do set ip=%%aset "old_rule=null"set "new_rule=%ip% %target_domain%"for /f "tokens=*" %%i in ('type %hosts_file%') do ( set "line=%%i" :: Retrieve the rule If the target domain has been exists in the line. if not "!line:%target_domain%=!"=="%%i" set "old_rule=%%i")if not "%old_rule%"=="null" ( if not "%old_rule%"=="%new_rule%" ( echo Deleting the rule "%old_rule%" echo Adding the rule "%new_rule%" for /f "tokens=*" %%i in ('type "%hosts_file%" ^| find /v /n "" ^& break ^> "%hosts_file%"') do ( set "rule=%%i" set "rule=!rule:*]=!" if "%old_rule%"=="!rule!" set "rule=%new_rule%" >>%hosts_file% echo(!rule! ) ) else ( echo The rule already exists, nothing to do. )) else ( echo Adding the rule "%new_rule%" echo.>>%hosts_file% echo.>>%hosts_file% echo # Fix Google Translate CN>>%hosts_file% echo %new_rule%>>%hosts_file%)echo Done.pause
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
在文件上点击右键,在弹出的菜单中点击【以管理员身份运行】即可。
原理十分简单,就是获取谷歌翻译国内的地址,然后将该地址加入系统的 hosts 文件中。
220.181.174.162 translate.googleapis.com
脚本已自动为大家完成了上述操作,同时智能选择了最快的翻译服务器。
添加完成后,重启 Chrome 浏览器再试试看。