From 492ca5d0c4ea7f5bfd0372ca0c42610a77194c0f Mon Sep 17 00:00:00 2001 From: "John R. D'Orazio" Date: Sat, 26 Oct 2024 02:23:46 +0200 Subject: [PATCH] debug setLocale --- php/index.php | 3 +++ php/src/LitSettings.php | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/php/index.php b/php/index.php index 489fa76..4cbeff6 100644 --- a/php/index.php +++ b/php/index.php @@ -39,6 +39,9 @@ $litSettings = new LitSettings($_GET, $directAccess); +// debug value of locale that the script was set to +echo ''; + $nationalCalendarOptions = ''; $diocesanCalendarOptions = ''; diff --git a/php/src/LitSettings.php b/php/src/LitSettings.php index 92eea77..281c24d 100644 --- a/php/src/LitSettings.php +++ b/php/src/LitSettings.php @@ -19,6 +19,7 @@ class LitSettings public ?string $Locale = null; public ?string $NationalCalendar = null; public ?string $DiocesanCalendar = null; + public ?string $setLocale = null; private ?array $MetaData = null; private bool $directAccess = false; @@ -129,7 +130,7 @@ public function __construct(array $DATA, bool $directAccess = false) $baseLocale . '.UTF-8', $baseLocale ]; - setlocale(LC_ALL, $localeArray); + $this->setLocale = setlocale(LC_ALL, $localeArray); $this->directAccess = $directAccess;