当前位置 : 主页 > 软件教程 > 其它软件 >

谷歌浏览器无法翻译网页如何解决?

来源:互联网 收集:自由互联 发布时间:2023-05-28
谷歌浏览器无法翻译网页如何解决?最近有用户反映在使用谷歌浏览器的时候,遇到了自带翻译功能不能使用的情况,导致没办法正常浏览英文网页,这是怎么回事呢?针对这一问题,

  谷歌浏览器无法翻译网页如何解决?最近有用户反映在使用谷歌浏览器的时候,遇到了自带翻译功能不能使用的情况,导致没办法正常浏览英文网页,这是怎么回事呢?针对这一问题,本篇带来了详细的解决方法,操作简单,分享给大家。

谷歌浏览器无法翻译网页如何解决?

  谷歌浏览器无法翻译网页如何解决?

  首先在本站下载谷歌浏览器bat脚本一键执行【点击下载】

  注意:要以管理员身份打开!

  @setlocal enabledelayedexpansion

  @echo off

  set 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=%%a

  set 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

上一篇:Edge浏览器在下载时怎么显示下载菜单?
下一篇:没有了
网友评论