当前位置: 首页>>代码示例>>PHP>>正文


PHP I18n::LoadDomain方法代码示例

本文整理汇总了PHP中I18n::LoadDomain方法的典型用法代码示例。如果您正苦于以下问题:PHP I18n::LoadDomain方法的具体用法?PHP I18n::LoadDomain怎么用?PHP I18n::LoadDomain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在I18n的用法示例。


在下文中一共展示了I18n::LoadDomain方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

/**
 * Define a variable that will tell header.php if session_start()
 * needs to be called or not (since it is also called from
 * session_check.php
 */
$is_template = true;
/**
 * Loads a language file from the current template folder based on
 * the system options.
 */
$lang = SITE_LANG;
if (!isset($ld)) {
    $ld = 'cftp_admin';
}
require_once ROOT_DIR . '/includes/classes/i18n.php';
I18n::LoadDomain(ROOT_DIR . "/templates/" . TEMPLATE_USE . "/lang/{$lang}.mo", $ld);
$this_template = BASE_URI . 'templates/' . TEMPLATE_USE . '/';
include_once ROOT_DIR . '/templates/session_check.php';
/**
 * URI to the default template CSS file.
 */
$this_template_css = BASE_URI . 'templates/' . TEMPLATE_USE . '/main.css';
$database->MySQLDB();
/**
 * Get all the client's information
 */
$client_info = get_client_by_username($this_user);
/**
 * Get the list of different groups the client belongs to.
 */
$sql_groups = $database->query("SELECT DISTINCT group_id FROM tbl_members WHERE client_id='" . $client_info['id'] . "'");
开发者ID:google-code-backups,项目名称:clients-oriented-ftp,代码行数:31,代码来源:common.php

示例2: define

 * on the footer blocks.
 *
 */
define('SYSTEM_URI', 'http://www.projectsend.org/');
define('SYSTEM_URI_LABEL', 'ProjectSend on Google Code');
define('DONATIONS_URL', 'http://www.projectsend.org/donations/');
/** Previously cFTP */
define('SYSTEM_NAME', 'ProjectSend');
define('LOGO_FOLDER', ROOT_DIR . '/img/custom/logo/');
define('LOGO_THUMB_FOLDER', ROOT_DIR . '/img/custom/thumbs/');
/**
 * Current system language
 *
 * @see sys.config.sample.php
 */
$lang = SITE_LANG;
define('I18N_DEFAULT_DOMAIN', 'cftp_admin');
require_once ROOT_DIR . '/includes/classes/i18n.php';
I18n::LoadDomain(ROOT_DIR . "/lang/{$lang}.mo", 'cftp_admin');
/** System User Roles names */
$user_role_9_name = __('System Administrator', 'cftp_admin');
$user_role_8_name = __('Account Manager', 'cftp_admin');
$user_role_7_name = __('Uploader', 'cftp_admin');
$user_role_0_name = __('Client', 'cftp_admin');
define('USER_ROLE_LVL_9', $user_role_9_name);
define('USER_ROLE_LVL_8', $user_role_8_name);
define('USER_ROLE_LVL_7', $user_role_7_name);
define('USER_ROLE_LVL_0', $user_role_0_name);
/** phpass */
define('HASH_COST_LOG2', 8);
define('HASH_PORTABLE', false);
开发者ID:google-code-backups,项目名称:clients-oriented-ftp,代码行数:31,代码来源:sys.vars.php


注:本文中的I18n::LoadDomain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。