Multi-language support

This commit is contained in:
bergware
2020-05-12 20:13:12 +02:00
parent 7301f1e225
commit 5d1fb95074
+9 -2
View File
@@ -16,10 +16,17 @@ Code="e982"
*/
?>
<script>
<?if (count(glob('/var/log/plugins/lang-*.xml'))==0):?>
// hide switch button when no other language packs
$(function(){$('#nav-item.LanguageButton').hide();});
<?endif;?>
function LanguageButton() {
switchLanguage('');
var locale = '<?=$locale?>';
if (locale) switchLanguage('');
}
function switchLanguage(lang) {
$.post('/webGui/include/LanguageReset.php',{lang:lang},function(){refresh();});
$.post('/webGui/include/LanguageReset.php',{lang:lang},function(){location.reload();});
}
</script>