Reply to Re: Get locales without shell access?

Your name:

Reply:


Posted by Mateusz Markowski on 10/13/06 15:10

Rik napisal(a):
> Mateusz Markowski wrote:
> > Rik napisal(a):
> >>> is there a _way_ in PHP to get the available locales without
> >>> shellacces?
> >
> > Yes, there is. You can use setlocale() and as second argument pass 0.
> > Then setlocale() will return current setting. For example:
> >
> > echo setlocale(LC_TIME, 0);
>
> It does, but that isn't what I mean: I want a list of the available locales
> without the use of fpassthru()/exec() etc.
>

So maybe try:

/*Your locale path*/
$path = "/usr/share/locale/";
$h = opendir($path);
while ($file = readdir($h))
$locales[] = $file;

But I have no idea if it works on non unix systems.

[Back to original 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

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