[Feelings & Sharing] Google 翻译用不了?看这里
Tofloor
poster avatar
kitefly
deepin
2022-10-07 18:28
Author

本文内容引用:https://www.bilibili.com/video/BV12V4y1N7aS

由于谷歌翻译不再向大陆用户提供支持,所以 translate.google.com 网页在中国服务器上撤掉了,只能通过正向代理连外服才能正常使用,大家可以了解下科学上网,这里就不作多介绍。(摘自引用视频)

但 translate.googleapis.com(Google翻译Api)能够正常运行

本文通过修改 hosts 文件使其能够使用了Google翻译Api的程序正常运行

注:本文仅针对Linux Deepin及衍生版本,其他发行版大同小异

Macos和Windows请看引用视频

修改 hosts 文件

用文本编辑器打开该文件:

/etc/hosts

在文段末尾输入

220.181.174.226 translate.googleapis.com

保存并退出

然后打开终端

输入命令:

sudo /etc/init.d/networking restart

该命令为刷新 DNS 缓存,不同的平台可能会有所不同,本文仅针对Linux Deepin 以及衍生版本

输入密码并回车(密码不显示)

若输出了
[ ok ] Restarting networking (via systemctl): networking.servic.

说明配置成功

重新启动使用了google翻译的程序,不出意外就可以正常使用啦~

更多Google翻译服务器ip

以下摘自引用视频

Google Translate接口地址统一为translate.googleapis.com

可选择以下25个云翻译服务器其中任意1个使用

谷歌云翻译中国服务器列表

北京 联通 114.250.63.34
北京 联通 114.250.65.34
北京 联通 114.250.66.34
北京 联通 114.250.70.34
北京 电信 220.181.174.34
北京 电信 220.181.174.98
北京 电信 220.181.174.162
北京 电信 220.181.174.226
北京 谷歌云 203.208.43.66
北京 谷歌云 203.208.50.66
北京 谷歌云 203.208.50.162

上海 移动 120.253.250.226
上海 移动 120.253.253.226
上海 移动 120.253.253.98
上海 移动 120.253.255.34
上海 电信 180.163.150.34
上海 电信 180.163.151.34
上海 电信 180.163.151.161
上海 电信 180.163.151.162
上海 谷歌云 203.208.40.34
上海 谷歌云 203.208.40.66
上海 谷歌云 203.208.40.98
上海 谷歌云 203.208.41.34
上海 谷歌云 203.208.41.66
上海 谷歌云 203.208.41.98
Reply Favorite View the author
All Replies
zl
deepin
2022-10-07 19:24
#1

不错,感谢分享。

Reply View the author
Free_Aaron.Li
deepin
2022-10-07 19:25
#2

kissing_heart

Reply View the author
璀璨星空
deepin
2022-10-07 20:34
#3

非常有用kissing_heart

Reply View the author
jjcui8595
deepin
2022-10-07 23:09
#4

这些国内服务器会不会也要被关闭?

Reply View the author
jjcui8595
deepin
2022-10-07 23:28
#5

亲测目前好用

Reply View the author
kinggochj
deepin
2022-10-08 17:54
#6
jjcui8595

这些国内服务器会不会也要被关闭?

迟早的事儿

Reply View the author
xuqi
deepin testing team
2022-10-09 17:10
#7

like

Reply View the author
Lwh2008-Equinox
deepin
2022-10-11 17:51
#8

话说是不是适用于Debian

Reply View the author
kitefly
deepin
2022-10-15 03:05
#9
jjcui8595

这些国内服务器会不会也要被关闭?

至少现在能用一下,之后我就不清楚还能用不了

希望能用

Reply View the author
kitefly
deepin
2022-10-15 03:29
#10
Lwh2008-Equinox

话说是不是适用于Debian

适用于所有系统(可能吧

只要修改hosts将translate.googleapis.com指定IP至上面的任意一个服务器

然后重启下系统或刷新下DNS缓存就行啦

Reply View the author
jjcui8595
deepin
2022-10-25 18:54
#11

果然凉了

Reply View the author