![Theme Switcher Image](https://stackcoder.in/images/theme-switcher.png?cb=stackcoder90070)
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.
Client-Side DataTable, Adding Super Powers To HTML Table
Unable to prepare route [{fallbackPlaceholder}] for serialization. Uses Closure In Laravel
Laravel 7.x Multiple Database Connections, Migrations, Relationships & Querying
Relationship Table Data With Route Model Binding In Laravel
Make Laravel Controllers Slim By Skimming Form Validation Request
Add Analytics To AMP (Accelerated Mobile Pages) HTML Pages
Push Files To CPanel / Remote Server using FTP Software FileZilla
Multiple File Uploads In Laravel PHP
Basic Server Security Setup For Ubuntu / Linux
Create Zip File On The Fly With Streaming Download In PHP Laravel
Setup Docker for NodeJs, MongoDB, MongoDB Compass
Detect AdBlocker With Javascript And Increase Website Ads Revenue