1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-21 07:06:41 +02:00

add session variable to keep the selected language throughout the app

This commit is contained in:
tale-fau 2023-09-13 15:48:06 +02:00
parent 00c7b3ff5c
commit afb510fb1d

View file

@ -2,6 +2,8 @@
$f3 = require(__DIR__.'/vendor/fatfree/base.php');
session_start();
if(getenv("DEBUG")) {
$f3->set('DEBUG', getenv("DEBUG"));
}
@ -37,8 +39,12 @@ if($f3->get('DISABLE_ORGANIZATION')) {
if ($f3->get('GET.lang')) {
$lang = $f3->get('GET.lang');
$_SESSION['LANGUAGE'] = $lang;
putenv("LANGUAGE=$lang");
$f3->set('LANGUAGE', $lang);
} elseif (isset($_SESSION['LANGUAGE'])) {
$lang = $_SESSION['LANGUAGE'];
putenv("LANGUAGE=$lang");
}
bindtextdomain('application', $f3->get('ROOT')."/locale/");
textdomain('application');