Several lines of code to add the Word translation function to your website

Source: Internet
Author: User

Add automatic translation of Web pages, Web page strokes, online translations, dictionaries, and daily functions for your website.
Suitable for all kinds of websites
Change language, automatic translation page

Will the Chinese web site become a site of more than 10 different languages, does it feel strange? To achieve automatic translation of the text on the site function, seemingly difficult, but through, Baidu, Google's translation gadgets to achieve it is very simple. As long as you add a page source code, you can translate a variety of language pages, so that users in other countries can also read your site.
To be simple, that's really simple--add the following code to the site to the appropriate location, you can achieve the multilingual translation of the Web page.
  
If you are using a CMS site management system, such as joomla,phpwind,wordpress,discuz, you need to add the tool to the full-site page, you can add the above code directly in the program template. Once added, open the Site page and provide instant access to the Web page for automatic translation.
After the code is added, switch to the website page, the page will appear Baidu, Google Translate tool icon (Figure 1), drop-down list provides English, Japanese, German, French and other dozens of languages translation functions. In this way, if you need to translate into a foreign language while browsing the website, select the desired language directly from the tool's drop-down menu.
Online learning to realize online translation function

Online translation function is very practical, for foreign visitors to the site, but also a human embodiment of the site. The ability to add translations on the site does not require much space, and if it is a tool site, it can be used as an additional gadget, personal website or blog can facilitate their own translation and learning of foreign languages.

We can also simply add code to achieve this function, Google, Baidu and many other sites have launched online translation tools, here we take Google as an example of the way to add online translation tools in the Web page.
Open the webpage with Dreamweaver or other web editing software and add the following code in the appropriate location:
  


And

Web page is the word function is to browse the Web page when you see a keyword, with the mouse to select the Word will automatically appear its Foreign language interpretation (we commonly used English learning software PowerWord also has this function, called "Screen take Word tool"). It features open Resources application interface, developers can customize the library of object retrieval, or directly to Google, Baidu and other search engines to retrieve object resource library.

1. Add English word translation function

You can only add the following code anywhere on the page to achieve the function of the English word search (Figure 3)

Introduced here, the benefit of doing so eliminates the installation of translation dictionaries,
End

Here we only provide translation from Chinese to English (Figure 2), other languages to be added, can be obtained in the compressed file we provide download. Google Translate provides a very rich foreign language translation capabilities, if you need to cut down the language translation features not required, just delete the drop-down menu options, the method is to directly delete the line markup language. Web page to translate the words to the fastest phrase

  
  


Chinese to English
  

Several lines of code to add the Word translation function to your website

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.