Translate website to any specific language, on page load
Jan 19, 2019 6:49 am by Leaon7756
Jan 19, 2019 6:49 am by Leaon7756
Anybody have any idea how to translate a web page into any language using Google translate when it loads?
I don't want a drop down menu, I just want to convert the website into a specific language when it loads. I have tried many things from 9apps.red" but all in vain. Any good suggestions would be appreciated.
Re: Translate website to any specific language, on page load
Jan 22, 2019 10:31 am by Yana
Jan 22, 2019 10:31 am by Yana
Hi,
If you are using free version you can call doGTranslate('en|es') (here the main language is English, and language to show is Spanish) JavaScript function on page load and change the language. It will require development skills.
In free plan, in order to have a translated version of the website as the page is loaded (without selecting a language), you can use the following script. In this example it will be Spanish.
Put this in footer.php file of your theme, before the closing </body> tag in your footer. If you have don't have a CMS, or can't find the footer file, please find a section of pure html, and put it there, so you don't have to think about php syntax. Please use FTP for modifying the footer.php, or other files of the website, and create a backup beforehand, just for your safety:
<script type="text/javascript">
if(localStorage.getItem("ChangeLanguageFirstTime") === null) {
doGTranslate('en|es');
localStorage.setItem("ChangeLanguageFirstTime", true);
}
</script>
SIMILAR TOPICS
Google stopped providing website translator widgets | Feb 28, 2019 2:43 pm | Replies: 0 | Post by: Edvard |
not aligned on website | Feb 27, 2019 2:24 pm | Replies: 1 | Post by: mrkapable007 |
Highly increased load on website from 51.255.131.149 | Feb 19, 2019 8:29 pm | Replies: 1 | Post by: Ant_Z |
wordpress amp link not translate | Dec 31, 2016 10:11 am | Replies: 12 | Post by: besybuy |
GT doesn't work...error 404 page | Jan 28, 2019 5:36 pm | Replies: 1 | Post by: vincenzodinuzzo |