Multi Language Support

Handle Situation on switching languages if the user has never changed a setting in the OS
This commit is contained in:
Squidly271
2020-05-08 16:35:21 -04:00
committed by GitHub
parent 63f51004f2
commit 2a2ce54ca2

View File

@@ -11,6 +11,10 @@
*/
?>
<?
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: "/usr/local/emhttp";
$lang = $_POST['lang'] ?? '';
if ( ! is_file("/boot/config/plugins/dynamix/dynamix.cfg") )
copy("$docroot/plugins/dynamix/default.cfg","/boot/config/plugins/dynamix/dynamix.cfg");
exec("sed -ri 's/^(locale=\")[^\"]*/\\1$lang/' /boot/config/plugins/dynamix/dynamix.cfg");
?>