This is a comment on Once again about an empty screen, posted by WikiAdmin at 22.09.2024 09:50

View source for Re: Once again about an empty screen | Patch

Replace in Wacko class function ##set_language()##:
%%(php)
<?php
// ...

$this->lang['locale'] = setlocale(LC_CTYPE, 0);
%%
with this possible FIX:
%%(php)
<?php
//...

/*
 * Check for a valid system locale, and override if invalid or set to 'C' which means 'unconfigured'
 * It will be overridden later via language-selection operations anyway, but a valid default must be set for Intl class methods to work
 */
$this->lang['locale'] = setlocale(LC_CTYPE, 0);

if ($this->lang['locale'] === false || $this->lang['locale'] === 'C')
{
    $this->lang['locale'] = setlocale(LC_CTYPE, ['en_US', 'en_US.UTF-8', 'en-US', 'en']);
}
%%

%%(hl diff)
diff --git a/src/class/wacko.php b/src/class/wacko.php
index 7d3d540..77e7ff2 100644
--- a/src/class/wacko.php
+++ b/src/class/wacko.php
@@ -668,7 +668,16 @@
 
 			mb_internal_encoding('utf-8');
 
+			/*
+			 * Check for a valid system locale, and override if invalid or set to 'C' which means 'unconfigured'
+			 * It will be overridden later via language-selection operations anyway, but a valid default must be set for Intl class methods to work
+			 */
 			$this->lang['locale'] = setlocale(LC_CTYPE, 0);
+			
+			if ($this->lang['locale'] === false || $this->lang['locale'] === 'C')
+			{
+			    $this->lang['locale'] = setlocale(LC_CTYPE, ['en_US', 'en_US.UTF-8', 'en-US', 'en']);
+			}
 		}
 
 		if ($set_translation)
%% 

Untested!

Looks like the PHP team are finally reinstating support for the default 'C' locale in PHP 8.2.15
  * ((https://github.com/php/php-src/commit/6a447e7437b988062fda6529cc84c6595de09b54 ext/intl accept C as acceptable locale argument))