mirror of
https://github.com/unraid/webgui.git
synced 2026-05-07 12:51:21 -05:00
Multi-language support
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user