Difference between revisions of "Widget:Language"
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
var b_jp = document.getElementById("text_jp"); | var b_jp = document.getElementById("text_jp"); | ||
− | function changeLanguage( | + | function changeLanguage(lang) { |
− | switch( | + | var lang_sel = lang.value; |
+ | switch(lang_sel) | ||
{ | { | ||
− | case es: | + | case "es": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 48: | Line 49: | ||
b_jp.style.display = "none"; | b_jp.style.display = "none"; | ||
break; | break; | ||
− | case fr: | + | case "fr": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 66: | Line 67: | ||
b_jp.style.display = "none"; | b_jp.style.display = "none"; | ||
break; | break; | ||
− | case it: | + | case "it": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 84: | Line 85: | ||
b_jp.style.display = "none"; | b_jp.style.display = "none"; | ||
break; | break; | ||
− | case de: | + | case "de": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 102: | Line 103: | ||
b_jp.style.display = "none"; | b_jp.style.display = "none"; | ||
break; | break; | ||
− | case ch: | + | case "ch": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 120: | Line 121: | ||
b_jp.style.display = "none"; | b_jp.style.display = "none"; | ||
break; | break; | ||
− | case ru: | + | case "ru": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 138: | Line 139: | ||
b_jp.style.display = "none"; | b_jp.style.display = "none"; | ||
break; | break; | ||
− | case jp: | + | case "jp": |
a_en.style.display = "none"; | a_en.style.display = "none"; | ||
b_en.style.display = "none"; | b_en.style.display = "none"; | ||
Line 156: | Line 157: | ||
b_jp.style.display = "inline"; | b_jp.style.display = "inline"; | ||
break; | break; | ||
− | + | default: | |
a_en.style.display = "inline"; | a_en.style.display = "inline"; | ||
b_en.style.display = "inline"; | b_en.style.display = "inline"; | ||
Line 177: | Line 178: | ||
</script> | </script> | ||
− | <select id=" | + | <select id="lang" onchange="changeLanguage(this)"> |
<option value="en" selected>EN - English</option> | <option value="en" selected>EN - English</option> | ||
<option value="es">ES - Español</option> | <option value="es">ES - Español</option> |
Revision as of 09:59, 17 March 2019
This widget inserts a language picker.