How to Create a Translator in Website.

Translator Code below here..



Step-1:- Create a  PHP Page  & Save the Page for this Path.     C:\xampp\htdocs

1-index.php




Step-2:- Write the Code of (index.php) page.



<!DOCTYPE html>
<html lang="en-US">
<title>Translator</title>
<body>
<style type="text/css">
.a1{
border: 1px solid white;
width: 20%;
height: 20px;
background-color: white;
margin: -18px 0px 0px 0px;
opacity: .9;
z-index: 1111;
}
</style>

<h1>Hello everybody!</h1>
<p>Translate this page:</p>
<div id="google_translate_element"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script><div class="a1"></div>
<p style="margin: -5px 0px 0px 0px;">You can translate the content of this page by
<br>selecting a language in the select box.</p>
</body>
</html>




Thanks




Comments

Popular posts from this blog

How to Create a Login With Signup form in php

Code of the filter Drop-down Menu.

Create a Responsive mega Drop Down.