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


PHP lang::updatelang方法代码示例

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


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

示例1: loadlang

function loadlang($language)
{
    $l = new lang();
    $l->updatelang($language);
    return $l;
}
开发者ID:BackupTheBerlios,项目名称:yapcas-svn,代码行数:6,代码来源:functions.php

示例2: config

 function __construct()
 {
     error_reporting(E_ALL);
     // as it crashes between this and load of the config
     // we need to have all debug info
     // FIXME
     if (!file_exists('.install.php')) {
         include 'kernel/config.class.php';
         $config = new config();
         $lang = new lang();
         $config->addConfigByFileName('site.config.php', TYPE_STRING, 'database/tblprefix', 0);
         define('TBL_PREFIX', $config->getConfigByNameType('database/tblprefix', TYPE_STRING));
         define('TBL_PAGES', TBL_PREFIX . 'pages');
         include 'kernel/help.class.php';
         include 'kernel/error.class.php';
         // This should not be in the release
         include 'kernel/users.class.php';
         include 'kernel/news.class.php';
         include 'kernel/polls.class.php';
         $config->addConfigByFileName('site.config.php', TYPE_INT, 'general/errorreporting', 0);
         $config->addConfigByFileName('site.config.php', TYPE_STRING, 'general/webmastermail', 0);
         error_reporting($config->getConfigByNameType('general/errorreporting', TYPE_INT));
         $config->addConfigByFileName('site.config.php', TYPE_STRING, 'general/databasetype', 0);
         loaddbclass($config->getConfigByNameType('general/databasetype', TYPE_STRING));
         $database = new database($config, 'site.config.php');
         $database->connect();
         // TODO
         $tables = array();
         if (checkDatabase($database, $tables)) {
             // Database seems to be OK
             $config->addConfigByFileName('site.config.php', TYPE_BOOL, 'user/activatemail', 0);
             $user = new user($database, $config->getConfigByNameType('user/activatemail', TYPE_BOOL), $lang);
             $news = new news($database, $user, $config, $lang);
             $poll = new polls($database, $config, $lang);
             $this->help = new help($database, $config, $lang);
             $config->addConfigByFileName('site.config.php', TYPE_FLOAT, 'general/servertimezone');
             $config->addConfigByFileName('site.config.php', TYPE_STRING, 'general/httplink');
             $config->addConfigByFileName('site.config.php', TYPE_STRING, 'general/sitename');
             $config->addConfigByFileName('site.config.php', TYPE_STRING, 'general/description');
             $config->addConfigByList('GET;YAPCAS_USER;COOKIE;FILE', array('timezone', $user, 'timezone', 'site.config.php'), 'general/timezone', TYPE_FLOAT, 1);
             $config->addConfigByList('GET;YAPCAS_USER;COOKIE;FILE', array('timeformat', $user, 'timeformat', 'site.config.php'), 'general/timeformat', TYPE_STRING, '');
             $config->addConfigByList('GET;YAPCAS_USER;COOKIE;FILE', array('language', $user, 'language', 'site.config.php'), 'general/language', TYPE_STRING, STANDARD_LANGUAGE);
             $lang->updatelang($config->getConfigByNameType('general/language', TYPE_STRING));
             $config->addConfigByList('GET;YAPCAS_USER;COOKIE;FILE', array('theme', $user, 'theme', 'site.config.php'), 'general/theme', TYPE_STRING, 'moderngray');
             $config->addConfigByList('GET;YAPCAS_USER;COOKIE;FILE', array('threaded', $user, 'threaded', 'site.config.php'), 'news/threaded', TYPE_BOOL, YES);
             $config->addConfigByList('GET;YAPCAS_USER;COOKIE;FILE', array('langcode', $user, 'langcode', 'site.config.php'), 'general/langcode', TYPE_STRING);
             $config->addConfigByList('YAPCAS_USER', array($user), 'user/email', TYPE_STRING);
             $config->addConfigByList('YAPCAS_USER', array($user), 'user/name', TYPE_STRING, 'anonymous');
             $this->loadtheme($config->getConfigByNameType('general/theme', TYPE_STRING));
             $this->config = $config;
             $this->news = $news;
             $this->config = $config;
             $this->poll = $poll;
             $this->lang = $lang;
             $this->user = $user;
             $this->database = $database;
             global $theme, $config, $news, $poll, $user, $lang, $database;
             $config = $this->config;
             $news = $this->news;
             $config = $this->config;
             $poll = $this->poll;
             $lang = $this->lang;
             $user = $this->user;
             $database = $this->database;
             $theme = $this;
         }
     } else {
         if (file_exists('site.config.php')) {
             include 'kernel/config.class.php';
             $config = new config();
             $config->addConfigByFileName('site.config.php', TYPE_STRING, 'database/tblprefix', 0);
             define('TBL_PREFIX', $config->getConfigByNameType('database/tblprefix', TYPE_STRING));
             define('TBL_PAGES', TBL_PREFIX . 'pages');
             $config->addConfigByFileName('site.config.php', TYPE_INT, 'general/errorreporting', 0);
             //error_reporting ($config->getConfigByNameType('general/errorreporting',TYPE_INT));
             $config->addConfigByFileName('site.config.php', TYPE_STRING, 'general/databasetype', 0);
             loaddbclass($config->getConfigByNameType('general/databasetype', TYPE_STRING));
             $database = new database($config, 'site.config.php');
             $database->connect();
             // FIXME
             $tables = array();
             if (checkDatabase($database, $tables)) {
                 // site is configured but the installscript exists???
                 echo 'DELETE install.php and than reload this page';
                 exit;
             } else {
                 header('Location: install.php');
             }
         } else {
             header('Location: install.php');
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:yapcas-svn,代码行数:93,代码来源:themes.class.php


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