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]
|