本文整理汇总了PHP中l10n::getFilePath方法的典型用法代码示例。如果您正苦于以下问题:PHP l10n::getFilePath方法的具体用法?PHP l10n::getFilePath怎么用?PHP l10n::getFilePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类l10n
的用法示例。
在下文中一共展示了l10n::getFilePath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadModuleL10Nresources
public function loadModuleL10Nresources($id, $lang)
{
if (!$lang || !isset($this->modules[$id])) {
return;
}
$f = l10n::getFilePath($this->modules[$id]['root'] . '/locales', 'resources.php', $lang);
if ($f) {
$this->loadModuleFile($f);
}
}
示例2: array
$core->adminurl->register('admin.plugins', 'plugins.php');
$core->adminurl->register('admin.plugin', 'plugin.php');
$core->adminurl->register('admin.search', 'search.php');
$core->adminurl->register('admin.user.preferences', 'preferences.php');
$core->adminurl->register('admin.user', 'user.php');
$core->adminurl->register('admin.user.actions', 'users_actions.php');
$core->adminurl->register('admin.users', 'users.php');
$core->adminurl->register('admin.auth', 'auth.php');
$core->adminurl->register('admin.help', 'help.php');
$core->adminurl->register('admin.update', 'update.php');
$core->adminurl->registercopy('load.plugin.file', 'admin.home', array('pf' => 'dummy.css'));
if ($core->auth->userID() && $core->blog !== null) {
# Loading resources and help files
$locales_root = dirname(__FILE__) . '/../../locales/';
require $locales_root . '/en/resources.php';
if ($f = l10n::getFilePath($locales_root, 'resources.php', $_lang)) {
require $f;
}
unset($f);
if (($hfiles = @scandir($locales_root . $_lang . '/help')) !== false) {
foreach ($hfiles as $hfile) {
if (preg_match('/^(.*)\\.html$/', $hfile, $m)) {
$GLOBALS['__resources']['help'][$m[1]] = $locales_root . $_lang . '/help/' . $hfile;
}
}
}
unset($hfiles, $locales_root);
// Contextual help flag
$GLOBALS['__resources']['ctxhelp'] = false;
$core->auth->user_prefs->addWorkspace('interface');
$user_ui_nofavmenu = $core->auth->user_prefs->interface->nofavmenu;