# translate
**Repository Path**: hppcloud/translate
## Basic Information
- **Project Name**: translate
- **Description**: 两行js实现html全自动翻译,页面无需改动,无语言配置文件,无API Key,对SEO友好!
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: http://www.leimingyun.com
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 268
- **Created**: 2023-06-11
- **Last Updated**: 2023-06-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
translate.js
Two lines of js realize automatic html translation.
No need to change the page, no language configuration file, no API key, SEO friendly!
Current English DOC | 查阅中文文档
# Characteristic
* **Easy to use.** Without any preliminary preparation, you can directly add a few lines of code to have the ability to automatically switch multiple languages.
* **No additional workload.** There is no need to modify the page itself, no language files that need to be configured separately for all languages, and no need for you to call the code of the text area to be displayed on the page itself. I think that is too unfriendly for technicians. Moreover, it doesn't need you to apply for any key to XXX website. It is open and ready to use.
* **Extremely flexible and scalable.** You can specify whether it will only translate certain specified areas, display the drop-down box when switching languages, or place multiple language switching buttons, and specify that certain specific elements will not be translated and ignored
* **Automatically match languages.** Automatically switch the language used in the user's country according to the user's country
* **Instant translation ability.** Built-in cache preloading mechanism, as long as the translated page is viewed again, it will achieve instant translation effect, giving the user the impression that the page is originally in this language, not translated by a third party.
* **Free for permanent use.** With the Apache - 2.0 open source protocol, you can use it for free forever.
* **Search engine friendly.** It does not affect the inclusion of your own website search engine. The source code of the webpage crawled by the crawler will not be changed. You can rest assured.
* **Back-end translation is open source.** In some government agencies and internal projects of large groups, when there are strong requirements for data privacy and security, or you want to provide self-built highly reliable translation services for your own customers, you can privatize the deployment of the back-end translation interface instead of our open translation interface, so as to achieve full control of security and back-end services.
# Online experience
[http://res.zvo.cn/translate/demo.html](http://res.zvo.cn/translate/demo.html)
# Try using other people's websites first

1. Open a webpage at random
2. Right click - review elements
3. Paste the following code:
```` var head= document.getElementsByTagName('head')[0]; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= 'https://res.zvo.cn/translate/inspector_v2.js'; head.appendChild(script); ````
4. Enter to execute
5. At the top left corner of the current page, there is a big language switch. Try switching.
# Quick use
At the end of the page, ````