本文整理汇总了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;
}