當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CAppUI::getLocaleFilesPaths方法代碼示例

本文整理匯總了PHP中CAppUI::getLocaleFilesPaths方法的典型用法代碼示例。如果您正苦於以下問題:PHP CAppUI::getLocaleFilesPaths方法的具體用法?PHP CAppUI::getLocaleFilesPaths怎麽用?PHP CAppUI::getLocaleFilesPaths使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CAppUI的用法示例。


在下文中一共展示了CAppUI::getLocaleFilesPaths方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadOldTranslation

 /**
  * load the activated translation from mediboard (used to compare with the sql one)
  *
  * @param array $locales the locales array
  *
  * @return string
  */
 function loadOldTranslation($locales = array())
 {
     if (!count($locales)) {
         $locales = array();
         $locale = CAppUI::pref("LOCALE", "fr");
         foreach (CAppUI::getLocaleFilesPaths($locale) as $_path) {
             include_once $_path;
         }
     }
     return $this->_old_translation = isset($locales[$this->source]) ? $locales[$this->source] : "";
 }
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:18,代碼來源:CTranslationOverwrite.class.php

示例2: foreach

/**
 * $Id$
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
global $version;
CCanDo::checkEdit();
/////////// Locales
foreach (glob("locales/*", GLOB_ONLYDIR) as $localeDir) {
    $localeName = basename($localeDir);
    $locales = array();
    $localeFiles = CAppUI::getLocaleFilesPaths($localeName);
    foreach ($localeFiles as $localeFile) {
        if (basename($localeFile) != "meta.php") {
            include $localeFile;
        }
    }
    $locales = CMbString::filterEmpty($locales);
    foreach ($locales as &$_locale) {
        $_locale = CMbString::unslash($_locale);
    }
    $path = "./tmp/locales-{$localeName}.js";
    if (!is_file($path)) {
        CAppUI::stepAjax("Locales-javascript-cache-none", UI_MSG_OK, $localeName);
        continue;
    }
    $fp = fopen($path, 'r');
開發者ID:OpenXtrem,項目名稱:mediboard-test,代碼行數:31,代碼來源:httpreq_check_shared_memory.php

示例3: foreach

 * Overwrite translation for the instance
 *
 * $Id$
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <dev@openxtrem.com>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkEdit();
$locales = CAppUI::flattenCachedLocales(CAppUI::$lang);
$in_use_locales = $locales;
//load old locales
$locale = CAppUI::pref("LOCALE", "fr");
foreach (CAppUI::getLocaleFilesPaths($locale) as $_path) {
    include_once $_path;
}
$locales = CMbString::filterEmpty($locales);
foreach ($locales as &$_locale) {
    $_locale = CMbString::unslash($_locale);
}
//get the list of translations made
$translation = new CTranslationOverwrite();
$translations_bdd = $translation->loadList();
/** @var CTranslationOverwrite[] $translations_bdd */
foreach ($translations_bdd as $_translation) {
    $_translation->loadOldTranslation($locales);
    $_translation->checkInCache();
}
//smarty
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:view_translations.php


注:本文中的CAppUI::getLocaleFilesPaths方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。