Translate website to any specific language, on page load

Popular automatic website translation tool

Translate website to any specific language, on page load

Postby Leaon7756 » Sat Jan 19, 2019 10:49 am

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.
Leaon7756
 
Posts: 1
Joined: Sat Jan 19, 2019 10:46 am

Re: Translate website to any specific language, on page load

Postby Yana » Tue Jan 22, 2019 2:31 pm

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>
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4547
Joined: Thu Jan 12, 2012 6:21 pm


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests