mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Fix: re-apply locale settings template context
This commit is contained in:
@@ -3,6 +3,15 @@
|
||||
use RaspAP\Networking\Hotspot\WiFiManager;
|
||||
$wifi = new WiFiManager();
|
||||
|
||||
// fix: re-apply locale settings in this template context
|
||||
if (!empty($_SESSION['locale'])) {
|
||||
putenv("LANG=" . $_SESSION['locale']);
|
||||
setlocale(LC_ALL, $_SESSION['locale']);
|
||||
bindtextdomain('messages', realpath(__DIR__ . '/../../locale'));
|
||||
bind_textdomain_codeset('messages', 'UTF-8');
|
||||
textdomain('messages');
|
||||
}
|
||||
|
||||
// set defaults
|
||||
$network = $network ?? [];
|
||||
$network['ssid'] = $network['ssid'] ?? '';
|
||||
|
||||
Reference in New Issue
Block a user