本文整理匯總了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] : "";
}
示例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');
示例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