Passo 1: Determine o código de idioma das páginas do seu site.
Passo 2: Copie o seguinte código para a parte apropriada do seu site. Substitua o código de idioma 'en' pelo código obtido no passo 1, se necessário.
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
English version
Ask Google Translate to translate a website
Thanks for submitting the request. You can now use the Website Translator on your site, with the instructions below.
Step 1: Determine the language code of your website pages.
Go to https://translate.google.com/, choose your site's language as the source language, then the "sl" parameter is the language code to be used.
For example, English language code is "en", and Japanese is "ja".
Step 2: Copy the following code to the appropriate part of your site. Replace the language code 'en' with the one you get from step 1, if needed.
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>




0 Comentários
Deixe seu comentário e sua sugestão de conteúdo.