Merge pull request #680 from bergware/mutli-language

Multi-language support
This commit is contained in:
tom mortensen
2020-05-12 17:26:41 -07:00
committed by GitHub
7 changed files with 16 additions and 9 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
Menu="Buttons"
Menu="Buttons:4"
Title="Feedback"
Icon="icon-u-chat"
Tag="icon-u-chat"
+1 -1
View File
@@ -1,4 +1,4 @@
Menu="Buttons"
Menu="Buttons:7"
Title="Help"
Icon="icon-u-help"
Code="e934"
+1 -1
View File
@@ -1,4 +1,4 @@
Menu="Buttons"
Menu="Buttons:5"
Title="Info"
Icon="icon-u-display"
Code="e930"
+10 -3
View File
@@ -1,4 +1,4 @@
Menu="Buttons"
Menu="Buttons:1"
Title="English"
Icon="icon-u-switch"
Code="e982"
@@ -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>
+1 -1
View File
@@ -1,4 +1,4 @@
Menu="Buttons"
Menu="Buttons:6"
Title="Log"
Icon="icon-u-log"
Code="e936"
+1 -1
View File
@@ -1,5 +1,5 @@
Cond="file_exists('/etc/nginx/htpasswd')"
Menu="Buttons:1"
Menu="Buttons:2"
Title="Logout"
Icon="icon-u-logout"
Code="e937"
+1 -1
View File
@@ -1,4 +1,4 @@
Menu="Buttons:2"
Menu="Buttons:3"
Title="Terminal"
Icon="icon-u-terminal"
Href="/webterminal/"