Last active
August 26, 2019 07:08
-
-
Save Mauryashubham/ac949f9086ba381fdc7f85108466ad77 to your computer and use it in GitHub Desktop.
How to change language in google translate using php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to change language in google translate using php | |
How to change language in google translate using php | |
/** | |
@author : Shubham Maurya, | |
Email id : [email protected] | |
**/ | |
Hi all , Welcome to shubhammaurya.com , Today we are going to discuss , | |
How to change language in google translate using php | |
LETS START | |
Auto Popup on page load | |
So, To start first make a file in notepad and save it as index.html and paste the below code. | |
<!-- Google Converter Code Starts --> | |
<div id="google_translate_element"></div> | |
<script type="text/javascript"> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en' , includedLanguages: 'en,hi'}, 'google_translate_element'); | |
} | |
</script> | |
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> | |
<!-- Google Converter Code End --> | |
You can add more languages using this function | |
includedLanguages: ' de,nl,en,es,it,fr' | |
Comment Below, If any problem occurs. | |
STAY CONNECTED FOR MORE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment