本文整理匯總了PHP中AppLocale::loadLocaleList方法的典型用法代碼示例。如果您正苦於以下問題:PHP AppLocale::loadLocaleList方法的具體用法?PHP AppLocale::loadLocaleList怎麽用?PHP AppLocale::loadLocaleList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AppLocale
的用法示例。
在下文中一共展示了AppLocale::loadLocaleList方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getDownloadableLocales
/**
* Get the list of locales that can be downloaded for the current
* version.
*/
function getDownloadableLocales()
{
$versionDao =& DAORegistry::getDAO('VersionDAO');
$version =& $versionDao->getCurrentVersion();
$versionString = $version->getVersionString();
$descriptorFilename = sprintf(LANGUAGE_PACK_DESCRIPTOR_URL, $versionString);
return AppLocale::loadLocaleList($descriptorFilename);
}
示例2: _allLocalesCacheMiss
/**
* Create a cache file with locale data.
* @param $cache CacheManager
* @param $id the cache id (not used here, required by the cache manager)
*/
function _allLocalesCacheMiss(&$cache, $id)
{
$allLocales =& Registry::get('allLocales', true, null);
if ($allLocales === null) {
// Add a locale load to the debug notes.
$notes =& Registry::get('system.debug.notes');
$notes[] = array('debug.notes.localeListLoad', array('localeList' => LOCALE_REGISTRY_FILE));
// Reload locale registry file
$allLocales = AppLocale::loadLocaleList(LOCALE_REGISTRY_FILE);
asort($allLocales);
$cache->setEntireCache($allLocales);
}
return null;
}