And the winning answer is....
from the Apache forum:
"There is no command "locale" (and "grep") on Windows which you can execute with system()"
So the test code from the Zen Date Wiki could not work.
After asking another question I got a german version of RTFM and sent to the php manual where I copied some code, looked at the Microsoft Language and Region codes
http://msdn.microsoft.com/en-us/library/39cwe7zf%28VS.71%29.aspx
http://msdn.microsoft.com/en-us/library/cdax410z%28VS.71%29.aspx
and made up a test for windows servers which may be of use to other geeks.
It fixed my "problem" in that it told me what to put in setlocale which was
@setlocale(LC_TIME, 'Spanish_Spain.1252'); for windows,
and
@setlocale(LC_TIME, 'es_ES.UTF8'); for UNIX
So, too many hours wasted on this silly issue but still, final score is computer 0 - human 1 which is how it should be.
echo '<hr>test UNIX server for locales';
echo "<br>The available 'locale' strings for 'en' on this server are:<br>";
echo '<pre>';
system('locale -a | grep -i en');
echo '</pre>';
// There is no command "locale" (and "grep") on Windows which you can execute with system()
echo '<hr>test WINDOWS server for locales';
/* try different possible locale names for english GB as of PHP 4.3.0 */
echo '<p>';
$loc_en = setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom');
echo "Preferred locale for english GB on this system is '$loc_en'";
echo '<br/>' . strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
/* try different possible locale names for english USA as of PHP 4.3.0 */
echo '<p>';
$loc_enusa = setlocale(LC_ALL, 'english_usa', 'english_america', 'english_united states', 'english_united-states', 'english_us');
echo "Preferred locale for english USA on this system is '$loc_enusa'";
echo '<br/>' . strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
/* try different possible locale names for german as of PHP 4.3.0 */
echo '<p>';
$loc_de = setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'deu_deu');
echo "Preferred locale for german on this system is '$loc_de'";
echo '<br/>' . strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
/* try different possible locale names for spanish as of PHP 4.3.0 */
echo '<p>';
$loc_es = setlocale(LC_ALL, 'esp_esp', 'esp_spain', 'spanish_esp', 'spanish_spain');
echo "Preferred locale for spanish on this system is '$loc_es'";
echo '<br/>' . strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
/* try different possible locale names for dutch as of PHP 4.3.0 */
echo '<p>';
$loc_nl = setlocale(LC_ALL, 'nld_nld');
echo "Preferred locale for dutch on this system is '$loc_nl'";
echo '<br/>' . strftime("%A %d %B %Y", mktime(0, 0, 0, 12, 22, 1978));
and what comes out on a unix server
test UNIX server for locales
The available 'locale' strings for 'en' on this server are:
en_AU
en_AU.iso88591
en_AU.utf8
en_BW
en_BW.iso88591
en_BW.utf8
en_CA
en_CA.iso88591
en_CA.utf8
en_DK
en_DK.iso88591
en_DK.utf8
en_GB
en_GB.iso88591
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.iso88591
en_HK.utf8
en_IE
en_IE.iso88591
en_IE.iso885915@euro
en_IE.utf8
en_IE@euro
en_IN
en_IN.utf8
en_NZ
en_NZ.iso88591
en_NZ.utf8
en_PH
en_PH.iso88591
en_PH.utf8
en_SG
en_SG.iso88591
en_SG.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.iso88591
en_ZA.utf8
en_ZW
en_ZW.iso88591
en_ZW.utf8
french
slovene
slovenian
test WINDOWS server for locales
Preferred locale for english GB on this system is ''
Friday 22 December 1978
Preferred locale for english USA on this system is ''
Friday 22 December 1978
Preferred locale for german on this system is 'de_DE@euro'
Freitag 22 Dezember 1978
Preferred locale for spanish on this system is ''
Freitag 22 Dezember 1978
Preferred locale for dutch on this system is ''
Freitag 22 Dezember 1978
and what come out on a windows server:
test UNIX server for locales
The available 'locale' strings for 'en' on this server are:
test WINDOWS server for locales
Preferred locale for english GB on this system is 'English_United Kingdom.1252'
Friday 22 December 1978
Preferred locale for english USA on this system is 'English_United States.1252'
Friday 22 December 1978
Preferred locale for german on this system is 'German_Germany.1252'
Freitag 22 Dezember 1978
Preferred locale for spanish on this system is 'Spanish_Spain.1252'
viernes 22 diciembre 1978
Preferred locale for dutch on this system is 'Dutch_Netherlands.1252'
vrijdag 22 december 1978
hasta pronto,
Steve
Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...