How to Use Google Chrome Translate on Apple Computer MacBook

Original link: https://www.williamlong.info/archives/6952.html

Since the last time I wrote ” Solving the Unavailable Chrome Browser Translation “, many users of Apple’s MacBook computers have added me to WeChat to ask me how to use Google Translate normally on my MacBook. The following is a detailed explanation.

Google Translate finally quit China, and when you visit the localized domain name of the original Google Translate, you will be prompted to bookmark a new URL. The new URL is the address of Google Translate Hong Kong. However, the new URL is not accessible from within the country. The change also affects Chrome’s built-in translation feature that was once available to users in China.

Due to the withdrawal of Google Translate from China, the translation function of Google Chrome is currently unavailable. The way to continue to use the built-in translation of Chrome is to resolve the domain name of the Google Translate API to a domain name that can be accessed normally by modifying the Hosts file. IP address.

Hosts is a system file without an extension. It can be opened with tools such as Notepad. Its function is to establish an associated “database” between some commonly used URL domain names and their corresponding IP addresses. When the URL is found, the system will first automatically find the corresponding IP address from the Hosts file. Once found, the system will immediately open the corresponding web page. If it is not found, the system will submit the URL to the DNS domain name resolution server for IP address resolution.

For MacBooks, the Hosts file is located at /etc/hosts.

Open the terminal (terminal) in the application, enter sudo vi /etc/hosts , then use the vi editor to add the following line to modify the save file.

203.208.39.226 translate.googleapis.com

After saving, you can enter the command ping translate.googleapis.com in the terminal to verify whether it takes effect.

After that, visit www.google.cn/chrome through a browser, download and install Google Chrome, visit the English webpage, right-click, and select “Translate Chinese (Simplified)” to translate between Chinese and English.

Google Translate

Appendix: Instructions for using vi

After entering vi, the default is “command mode (command mode)”, in “command line mode (command mode)” press the letter “i” to enter “insert mode (Insert mode)”, then you can Start typing. Press the “ESC” key once to return to “command mode”. In “command mode (command mode)”, press the “:” colon key to enter “Last line mode”, enter “wq”, save the disk and exit vi, enter q! to force quit vi without saving the disk.

This article is reprinted from: https://www.williamlong.info/archives/6952.html
This site is for inclusion only, and the copyright belongs to the original author.