
Good content takes time and effort to come up with.
Please consider supporting us by just disabling your AD BLOCKER and reloading this page again.
Hey there! In this article let us see how to integrate Google Translate into your website.
Add the following in your Footer
. The following code basically searches for the google_translate_element
element in your website and replaces that with the Google Translator element
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script>
<script asyc type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Add the following HTML code in your navigation or another place where you want to show the Google Translate plugin.
<li class="language-translator">
<span id="google_translate_element"></span>
</li>
Its that simple. Happy coding.
Factories To Speed Up Test-Driven Development In Laravel
What Is HTTP? Different HTTP Methods And Status Codes Explained With Examples
Laravel Custom Maintenance Page
Comment And Like System Using Disqus
Google, Twitter, GitHub, Facebook & Many Other Social Generic Logins With PHP Laravel Socialite
Setup MAMP Virtual Hosts For Local PHP Development
Relationship Table Data With Route Model Binding In Laravel
URL Redirects From Called Functions In Laravel
Securely Connect Server MYSQL DB From Sequel Pro / MYSQL Workbench
Upload File From Frontend Server {GuzzleHttp} To REST API Server In PHP {Laravel}
Getting Started With AMP (Accelerated Mobile Pages)
Facebook Login With PHP Laravel Socialite