Exemplo n.º 1
0
 /**
  * loadLocale
  *
  * @param string $domain Module dirname; global language file will be loaded if set to 'global' or not specified
  * @param string $locale Locale to be loaded, current language content will be loaded if not specified
  *
  * @return  boolean
  */
 public static function loadLocale($domain = null, $locale = null)
 {
     return \Xoops\Locale::loadLocale($domain, $locale);
 }
Exemplo n.º 2
0
<?php

if (defined('XOOPS_TU_ROOT_PATH')) {
    return;
}
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    die("XOOP check: PHP version require 5.3.0 or more");
}
// needed for phpunit => initializing $_SERVER values
if (empty($_SERVER["HTTP_HOST"])) {
    define('IS_PHPUNIT', true);
}
if (defined('IS_PHPUNIT')) {
    require_once dirname(__FILE__) . '/common_phpunit.php';
} else {
    // Avoid check proxy to define constant XOOPS_DB_PROXY
    // because it implies a readonly database connection
    $_SERVER['REQUEST_METHOD'] = 'POST';
    define('XOOPS_XMLRPC', 0);
}
define('XOOPS_TU_ROOT_PATH', realpath(dirname(__FILE__) . '/../../htdocs'));
//temporary patch, we still need mainfile until we have a config file
$xoopsOption["nocommon"] = true;
// don't include common.php file
require_once XOOPS_TU_ROOT_PATH . '/mainfile.php';
//require_once(XOOPS_TU_ROOT_PATH . '/class/XoopsBaseConfig.php');
\XoopsBaseConfig::bootstrapTransition();
require_once XOOPS_TU_ROOT_PATH . '/xoops_lib/Xoops/Locale.php';
\Xoops\Locale::loadLocale();