$localeList = new Zend_Locale(); $locales = $localeList->getLocaleList(); print_r($locales);
$locales = Zend_Locale::getLocaleList(); foreach ($locales as $locale) { echo $locale . "\n"; }This example calls the getLocaleList method statically, without creating an instance of the Zend_Locale class. It then loops through the resulting array and prints each locale to the screen. Overall, these examples demonstrate how the getLocaleList method can be used to obtain a list of available locales on the system, which can be useful for selecting the appropriate locale for internationalization tasks. As mentioned earlier, this method is part of the Zend_Locale package library within the PHP Zend Framework.