You are here: Re: Setlocale problem (PHP on Linux) « PHP Programming Language « IT news, forums, messages
Re: Setlocale problem (PHP on Linux)

Posted by Janwillem Borleffs on 12/23/05 16:49

Schraalhans Keukenmeester wrote:
> I run Apache 1.3.33 and PHP 5.0.4 on my Suse9.2 Linux box.
> If I try any of the following:
>
> setlocale (LC_TIME,'nl');
> setlocale (LC_TIME,'nl_NL'); //example php.net site
> setlocale (LC_TIME,'NL');
> setlocale (LC_TIME,'Dutch');
> setlocale (LC_TIME,'nl-NL');
> etc.
>
> nothing changes, and FALSE is returned.
> When invoked with a NULL value, 'c' is returned.
> In /usr/share/locale the dir for Dutch localization is called nl.
>

Try the following script and check which locales return 1:

<?php

$locale = '/usr/share/locale';
$list = glob("$locale/*nl*");

foreach ($list as $item) {
$item = basename($item);
echo " $item : ", setlocale(LC_TIME, $item) ? 1 : 0, "\n";
}

?>


JW

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация