Chèn đoạn code này vào website
<style type=”text/css”>
body {
top: 0 !important;
}
iframe#\:0\.container {
display: none;
}
body {
top: 0 !important;
}
.ct-language__dropdown{
padding-top: 8px;
max-height: 0;
overflow: hidden;
position: absolute;
top: 110%;
left: -3px;
-webkit-transition: all 0.25s ease-in-out;
transition: all 0.25s ease-in-out;
text-align: center;
padding-top: 0;
z-index:200;
}
.ct-language__dropdown li{
/*background: #222;*/
margin: 0;
}
.ct-language__dropdown li a{
display: block;
}
.ct-language__dropdown li:first-child{
/*border-radius: 3px 3px 0 0;*/
}
.ct-language__dropdown li:last-child{
border-radius: 0 0 3px 3px;
}
.ct-language__dropdown li:hover{
/*background: #444;*/
}
.ct-language{
position: relative;
color: #fff;
margin-bottom: 0;
}
.ct-language:hover .ct-language__dropdown{
max-height: 200px;
padding-top: 8px;
}
li.ct-language img {
width: 33px;
}
.ct-topbar__list li {
list-style: none;
}
@media(max-width: 768px) {
.ct-language__dropdown li a {
padding: 0 !important;
color: unset !important;
}
}
</style>
<div class=”ct-topbar”>
<div class=””>
<ul class=”list-unstyled list-inline ct-topbar__list”>
<li class=”ct-language”><img src=”/public/frontend/themes/scanwelllog/vi.png” alt=”Việt Nam”>
<ul class=”list-unstyled ct-language__dropdown”>
<li><a href=”#googtrans(vi|en)” class=”lang-en lang-select” data-lang=”en”><img src=”https://www.solodev.com/assets/google-translate/flag-usa.png” alt=”USA”></a></li>
<li><a href=”#googtrans(vi|vi)” class=”lang-es lang-select” data-lang=”vi”><img src=”/public/frontend/themes/scanwelllog/vi.png” alt=”Việt Nam”></a></li></ul>
</li>
</ul>
</div>
</div>
<script type=”text/javascript”>
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: ‘vi’, layout: google.translate.TranslateElement.FloatPosition.TOP_LEFT}, ‘google_translate_element’);
}function triggerHtmlEvent(element, eventName) {
var event;
if (document.createEvent) {
event = document.createEvent(‘HTMLEvents’);
event.initEvent(eventName, true, true);
element.dispatchEvent(event);
} else {
event = document.createEventObject();
event.eventType = eventName;
element.fireEvent(‘on’ + event.eventType, event);
}
}jQuery(‘.lang-select’).click(function() {
var theLang = jQuery(this).attr(‘data-lang’);
jQuery(‘.goog-te-combo’).val(theLang);//alert(jQuery(this).attr(‘href’));
window.location = jQuery(this).attr(‘href’);
location.reload();});
</script>
<script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>