Merge pull request #670 from bergware/mutli-language

Multi-language support
This commit is contained in:
tom mortensen
2020-05-06 11:44:34 -07:00
committed by GitHub
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
Menu="Buttons"
Title="English"
Icon="icon-u-switch"
Code="e982"
---
<?PHP
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<script>
function LanguageButton() {
switchLanguage('');
}
function switchLanguage(lang) {
$.post('/webGui/include/LanguageReset.php',{lang:lang},function(){refresh();});
}
</script>

View File

@@ -0,0 +1,16 @@
<?PHP
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020, Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
$lang = $_POST['lang'] ?? '';
exec("sed -ri 's/^(locale=\")[^\"]*/\\1$lang/' /boot/config/plugins/dynamix/dynamix.cfg");
?>