I'm a bit new to programming and as the title says I wanted to make a function that allowed me to switch between images depending on the text I selected from the google translate dropdown between the id of image1 and image2, allowing me to show an image and hide the another image, but I have no idea how to start.
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'pt',
autoDisplay: 'true',
includedLanguages: 'pt,en',
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
}, 'google_translate_element');
}
<script src='//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit'></script>
<div class="hero_area">
<header class="header_section">
<div class="container">
<nav class="navbar navbar-expand-lg custom_nav-container ">
<ul class="navbar-nav">
<li style="padding-top: 25px;" class="nav-item">
<div style="margin-right: 140px;" id='google_translate_element'></div>
</li>
</ul>
<a class="navbar-brand" href="#"><img id="image1" width="300" src="https://static.vecteezy.com/ti/vetor-gratis/t2/567055-icone-de-pessoa-gr%C3%A1tis-vetor.jpg" /></a>
<a class="navbar-brand" href="#"><img id="image2" width="300" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR1AkIYdHRh_fVi-0j0CdCWCZXeEvOIolZQDSf4l-7oewZSOSReebanjktPa_7JE5LxO84&usqp=CAU" /></a>
</nav>
</div>
</header>
</div>