Add google translate button to template

This commit is contained in:
Andre Heinecke 2025-06-06 02:15:09 +02:00
parent 16a3c7b1cf
commit 5f1231036b
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C
1 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,7 @@
<a href="blog.html">Blog</a> <a href="blog.html">Blog</a>
<a href="https://git.esus.name/">Git</a> <a href="https://git.esus.name/">Git</a>
</nav> </nav>
<div id="google_translate_element" class="translate-button"></div>
</div> </div>
</div> </div>
</header> </header>
@ -44,5 +45,20 @@
<p class="copyright">Copyright 2025 ΞSUS. License CC-BY-SA-4. <a href="legal.html">Legal Notice</a>. <p class="copyright">Copyright 2025 ΞSUS. License CC-BY-SA-4. <a href="legal.html">Legal Notice</a>.
</div> </div>
</footer> </footer>
<!-- Google Translate Script -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
includedLanguages: '',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script>
<script type="text/javascript"
src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
</body> </body>
</html> </html>