<h1>no translate paragraph</h1> <h1 class="translate"> i want to translate the line</h1> </body> <p id="tr_title" class="translate"></p> <div id="google_translate_element" class="alert alert-dismissible fade show text-center bg-theme" rol"> <h1>no translate paragraph</h1> <h1 class="translate"> i want to translate the line</h1> </body> <p id="tr_title" class="translate"></p> <div id="google_translate_element" class="alert alert-dismissible fade show text-center bg-theme" rol">

How can I translate only one DIV using translate.google.com

<body class="notranslate">

<h1>no translate paragraph</h1>

<h1 class="translate"> i want to translate the line</h1>
</body>
<p id="tr_title" class="translate"></p> 

<div id="google_translate_element" class="alert alert-dismissible fade show text-center bg-theme" role="alert">
 
</div>
<script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: 'hi',includedLanguages : 'hi,zh-CN,en'}, 'google_translate_element');
  //htext = document.getElementById("tr_title").value;
  //navigator.clipboard.writeText(htext);
}//, includedLanguages : 'hi,zh-CN,en'
window.onload = function() {
 $(".VIpgJd-ZVi9od-l4eHX-hSRGPd").html("Aditya");
};
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<script>
function myFunction() {
  let text = document.getElementById("inputTitle").value;
  document.getElementById("tr_title").innerHTML = text;
 
}
</script>

Discover more from Soa Technology | Aditya Website Development Designing Company

Subscribe to get the latest posts sent to your email.



Leave a Reply

Discover more from Soa Technology | Aditya Website Development Designing Company

Subscribe now to keep reading and get access to the full archive.

Continue reading