1. Solve the error
The occurrence of this error also means that the translation plugin cannot be used.
1. First find the hosts file, path: C:\Windows\System32\drivers\etc
2. Add two lines of content to the hosts file (if the addition fails, see below to modify the hosts permission to solve it)
Open the hosts file with Notepad
Add content:
203.208.40.66 translate.google.com
203.208.40.66 translate.googleapis.com
This method solves the problem of Google Chrome webpage translation failure, and resolves the IP of the foreign domain name to the IP of the domestic translation website
(or paste the following content, you can choose to paste
142.250.105.90 translate.googleapis.com
142.250.107.90 translate.googleapis.com
172.253. 114.90 translate.googleapis.com
172.253.124.90 translate.googleapis.com
If you still want to speed up the access speed of github, you can copy
52.69.186.44 github.com
52.74.223.119 github.com)
3. Open pycharm
Check option settings
4, restart pycharm
5, successful display
The statement can be translated successfully.
Second, modify the hosts file permissions
If when adding content, a
The file permissions can be modified by the following steps
Right-click the hosts file - properties - remove the check in front of "read-only".
-
Right click on hosts - properties
-
Click on "Security"
-
Click "Advanced" - enter hosts advanced security settings
-
Click "Change" to select users and groups
-
Enter the name of the object to be selected - enter administrator in the white box (choose the account you use) - click OK
-
Click "OK" again
-
Click "OK"
-
Right click on hosts again - Properties
-
hosts property - "Security" - "Edit"
-
Permissions of hosts - select administrator in the group or user name - administrators - deny the check box below to remove - OK
-
Windows Security Center pops up - click "Yes"
-
Click "OK", so far the hosts can be modified.
Friendly reminder: There is no separate permission to modify the hosts file, such as no read, no modification, no write, etc.
It can be modified in the hosts permission box. Select your user as shown in the figure below - in user permissions - control the permissions of hosts by unchecking and checking the checkboxes under "Allow and Deny", which can be applied flexibly.