Feat: Google Translate translation for page content.
This commit is contained in:
17
index.html
17
index.html
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user