A
A
Andrey Deshin2016-11-22 18:22:33
Google
Andrey Deshin, 2016-11-22 18:22:33

How to make google translate automatically translate text?

Good evening! There is a site. It has two languages ​​- English and Chinese. The original language is English.
Google translate code:

<script type="text/javascript">function googleTranslateElementInit() {new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'zh-TW,en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE,autoDisplay: false, gaTrack: true, gaId: 'UA-1905624-16'}, 'google_translate_element');$('.goog-te-gadget-icon').css('display', 'none'); $('.goog-te-gadget-icon').css('font-size', '0'); }</script><script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

It is necessary that the text from English is immediately translated into Chinese when the visitor enters, i.e. so that he does not have to click and select the language. The main language should be Chinese - but I can't get it to set to Chinese without switching the language from English.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question