The method getDefault() returns an array of relevant locales
using information from the user's web browser (if available), information from the
environment of the host server, and Zend Framework settings. As with the constructor
for Zend_Locale, the first parameter selects a preference of
which information to consider (BROWSER,
ENVIRONMENT, or FRAMEWORK first.
The second parameter toggles between returning all matching locales or only the
first or best match. Locale-aware components normally use only the first locale. A
quality rating is included, when available.
Example 534. Get default locales
<?php
$locale = new Zend_Locale();
// Return all default locales
$found = $locale->getDefault();
print_r($found);
// Return only browser locales
$found2 = $locale->getDefault(Zend_Locale::BROWSER,TRUE);
print_r($found2);
To obtain only the default locales relevant to the BROWSER,
ENVIRONMENT, or FRAMEWORK, use
the corresponding method:
getEnvironment()getBrowser()getLocale()




