本文整理匯總了PHP中CAppUI::flattenCachedLocales方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::flattenCachedLocales方法的具體用法?PHP CAppUI::flattenCachedLocales怎麽用?PHP CAppUI::flattenCachedLocales使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CAppUI
的用法示例。
在下文中一共展示了CAppUI::flattenCachedLocales方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: checkInCache
/**
* check if the translation is cached
*
* @return bool
*/
function checkInCache()
{
static $locales;
if (!$locales) {
$locales = CAppUI::flattenCachedLocales(CAppUI::$lang);
}
return $this->_in_cache = isset($locales[$this->source]) && $locales[$this->source] == $this->translation;
}
示例2: preg_match
preg_match('#^//(\\d+)#', fgets($fp), $v);
if ($v[1] < $version['build']) {
CAppUI::stepAjax("Locales-javascript-cache-ko", UI_MSG_WARNING, $localeName);
fclose($fp);
continue;
}
if (null == SHM::get("locales-{$localeName}-" . CAppUI::LOCALES_PREFIX)) {
CAppUI::stepAjax("Locales-shm-none", UI_MSG_OK, $localeName);
continue;
}
// Load overwritten locales if the table exists
$overwrite = new CTranslationOverwrite();
if ($overwrite->isInstalled()) {
$locales = $overwrite->transformLocales($locales);
}
$cached_locales = CAppUI::flattenCachedLocales($localeName);
if ($cached_locales != $locales) {
CAppUI::stepAjax("Locales-shm-ko", UI_MSG_WARNING, $localeName);
continue;
}
CAppUI::stepAjax("Locales-shm-ok", UI_MSG_OK, $localeName);
}
// Not used yet (because of PHP 5.1)
//if (null == SHM::get("modules")) {
// CAppUI::stepAjax("Modules-shm-none", UI_MSG_OK);
//}
////////// Configuration model
$cache_status = CConfiguration::getModelCacheStatus();
switch ($cache_status) {
case "empty":
CAppUI::stepAjax("ConfigModel-shm-none", UI_MSG_OK);
示例3: array
<?php
/**
* $Id$
*
* @package Mediboard
* @subpackage developpement
* @author SARL OpenXtrem <dev@openxtrem.com>
* @license GNU General Public License, see http://www.gnu.org/licenses/gpl.html
* @version $Revision$
*/
CCanDo::checkRead();
$locales = CAppUI::flattenCachedLocales(CAppUI::$lang);
$tabs = array();
foreach ($modules = CModule::getInstalled() as $module) {
CAppUI::requireModuleFile($module->mod_name, "index");
if (is_array($module->_tabs)) {
foreach ($module->_tabs as $tab) {
$tabs[$tab]["name"] = "mod-{$module->mod_name}-tab-{$tab}";
$tabs[$tab]["locale"] = CValue::read($locales, $tabs[$tab]["name"]);
}
}
}
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("module", $modules);
$smarty->assign("tabs", $tabs);
$smarty->display("mnt_module_actions.tpl");