mirror of
https://github.com/unraid/webgui.git
synced 2026-01-18 15:40:09 -06:00
Multi Language Support
Handle Situation on switching languages if the user has never changed a setting in the OS
This commit is contained in:
@@ -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");
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user