Feat: Google Translate translation for page content.

This commit is contained in:
2025-03-04 18:47:45 +00:00
parent e096f03a2a
commit 973df8f70b

View File

@@ -89,6 +89,11 @@
color: var(--accent-color);
}
/* Google Translate styles */
.skiptranslate {
/* display: none; */
}
/* Main content styles */
main {
max-width: 1200px;
@@ -262,6 +267,7 @@
<header>
<h1>Edward (Teddy) Middleton-Smith</h1>
<p>Software Engineer | ERP Systems and Business Process Automation</p>
<div id="google_translate_element"></div>
</header>
<nav>
@@ -456,5 +462,16 @@
});
});
</script>
<!-- Google Translate Script -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</body>
</html>