Zen-cart website page Add Google Translate

Source: Internet
Author: User

 Many browsers have the ability to automatically translate Web pages, such as Google Chrome, in fact, through the Google API interface can also be added to the Zen-cart site page of a translation selection box, as follows: The following is the code to add:! Start Google Tra

Many browsers have the ability to automatically translate Web pages, such as Google Chrome, in fact, through the Google API interface can also be on the Zen-cart site page Add a selection box for the translation,
as follows:

 

Below is the code you need to add:

<!–start Google translator/language selection–>

<div class= "Gt-text" >translate:</div><div id= "Google_translate_element" ></div> <script>

Function googletranslateelementinit () {

New google.translate.TranslateElement ({

Pagelanguage: ' en ',

Autodisplay:false,

Layout:google.translate.TranslateElement.InlineLayout.SIMPLE

}, ' google_translate_element ');

}

</script><script src= "//translate.google.com/translate_a/element.js?cb= Googletranslateelementinit "></SCRIPT>

<!–google translator/language selection–>

 

 

Just put this code where you want to show the box where you can choose the translation language, and you can use a div to control the position with CSS.

 

Enterprise Templates website

 

Zen-cart website page Add Google Translate

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.