WebSite X5Help Center

 
Lasse A.
Lasse A.
User

The list of available languages too wide.  en

Autor: Lasse A.
Visitado 52, Followers 2, Compartido 0  

The list of available languages that can be selected in the “Select Language” box becomes too wide.

When I use the “Select Language” function via Google Translate on a website, the language list becomes so wide that it does not fit on the screen. The list also cannot be scrolled horizontally, which means I cannot display all the available languages. I want to reach the selector function from the menu. How can I fix this issue?

Publicado en
3 RESPUESTAS
Daniel W.
Daniel W.
User
Usuario del mes DEUsuario del mes EN

It's best to wait until KolAsim gets in touch, he has some JavaScripts for a smaller language selection.

I don't want to link to any previous posts before KolAsim got in touch.

Leer más
Publicado en de Daniel W.
Incomedia
Eric C.
Incomedia

Hello,
unfortunately the object has no longer been updated, as it has been made obsolete by the advent of translation functions integrated in the browsers directly.
You could intervene with custom code to change the object itself, or replace it with an HTML Code object for a better way of displaying a list of languages (you can customize the ones to be displayed):

<div id='google_translate_element'></div>

<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
includedLanguages: 'en,zh-CN,es,de,it,fr,pt,nl,pl,ru,ja,ko,hi,th,ar',
layout: google.translate.TranslateElement.InlineLayout.VERTICAL
}, 'google_translate_element');
}

/*
google.translate.TranslateElement.InlineLayout.SIMPLE
google.translate.TranslateElement.InlineLayout.VERTICAL
google.translate.TranslateElement.InlineLayout.HORIZONTAL
*/
</script>

<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

Leer más
Publicado en de Eric C.
Lasse A.
Lasse A.
User
Autor

Thank you very much, this works perfectly!

BR Lasse

Leer más
Publicado en de Lasse A.