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


PHP common::GetLangFile方法代码示例

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


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

示例1: testKeys

 function testKeys()
 {
     global $langmessage, $languages;
     //get en language
     common::GetLangFile('main.inc', 'en');
     $keys_en = array_keys($langmessage);
     //compare keys in other languages
     foreach ($languages as $code => $lang) {
         $langmessage = array();
         common::GetLangFile('main.inc', $code);
         $keys = array_keys($langmessage);
         self::AssertEquals($keys_en, $keys, 'Keys in language file don\'t match for ' . $lang . ' (' . $code . ')');
     }
 }
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:14,代码来源:LanguagesTest.php

示例2: __construct

 function __construct()
 {
     global $languages, $install_language, $langmessage;
     //language preferences
     $install_language = 'en';
     if (isset($_GET['lang']) && isset($languages[$_GET['lang']])) {
         $install_language = $_GET['lang'];
     } elseif (isset($_COOKIE['lang']) && isset($languages[$_COOKIE['lang']])) {
         $install_language = $_COOKIE['lang'];
     }
     setcookie('lang', $install_language);
     common::GetLangFile('main.inc', $install_language);
     echo '<h1>';
     echo $langmessage['Installation'];
     echo ' - v' . gpversion;
     echo '</h1>';
     $installed = false;
     $cmd = common::GetCommand();
     switch ($cmd) {
         case 'Continue':
             $this->FTP_Prepare();
             break;
         case 'Install':
             $installed = $this->Install_Normal();
             break;
     }
     if (!$installed) {
         $this->LanguageForm();
         $this->CheckFolders();
     } else {
         $this->Installed();
     }
 }
开发者ID:stegrams,项目名称:Typesetter,代码行数:33,代码来源:install.php

示例3: GetConfig

 /**
  * Set the $config array from /data/_site/config.php
  *
  */
 static function GetConfig()
 {
     global $config, $gp_hooks;
     $config = gpFiles::Get('_site/config');
     if (!is_array($config) || !array_key_exists('gpversion', $config)) {
         common::stop();
     }
     //remove old values
     if (isset($config['linkto'])) {
         unset($config['linkto']);
     }
     if (isset($config['menu_levels'])) {
         unset($config['menu_levels']);
     }
     //2.3.2
     if (isset($config['hidegplink'])) {
         //2.4RC2
         if ($config['hidegplink'] === 'hide') {
             $config['showgplink'] = false;
         }
         unset($config['hidegplink']);
     }
     //make sure defaults are set
     $config += array('maximgarea' => '691200', 'maxthumbsize' => '100', 'check_uploads' => false, 'colorbox_style' => 'example1', 'combinecss' => true, 'combinejs' => true, 'etag_headers' => true, 'customlang' => array(), 'showgplink' => true, 'showsitemap' => true, 'showlogin' => true, 'auto_redir' => 90, 'resize_images' => true, 'jquery' => 'local', 'addons' => array(), 'themes' => array(), 'gadgets' => array(), 'passhash' => 'sha1', 'hooks' => array());
     //shahash deprecated 4.0
     if (isset($config['shahash']) && !$config['shahash']) {
         $config['passhash'] = 'md5';
     }
     // default gadgets
     $config['gadgets'] += array('Contact' => array('script' => '/include/special/special_contact.php', 'class' => 'special_contact_gadget'), 'Search' => array('script' => '/include/special/special_search.php', 'method' => array('special_gpsearch', 'gadget')));
     foreach ($config['hooks'] as $hook => $hook_info) {
         if (isset($gp_hooks[$hook])) {
             $gp_hooks[$hook] += $hook_info;
         } else {
             $gp_hooks[$hook] = $hook_info;
         }
     }
     common::GetLangFile();
     common::GetPagesPHP();
     //upgrade?
     if (version_compare($config['gpversion'], '2.3.4', '<')) {
         includeFile('tool/upgrade.php');
         new gpupgrade();
     }
 }
开发者ID:Knuzen,项目名称:gpEasy-CMS,代码行数:49,代码来源:common.php

示例4: GetConfig

 /**
  * Set the $config array from /data/_site/config.php
  *
  */
 function GetConfig()
 {
     global $config, $gp_index, $dataDir, $gp_menu;
     require $dataDir . '/data/_site/config.php';
     if (!is_array($config)) {
         common::stop();
     }
     $GLOBALS['fileModTimes']['config.php'] = $fileModTime;
     common::GetPagesPHP();
     if (!is_array($gp_menu)) {
         common::stop();
     }
     //remove old values
     if (isset($config['linkto'])) {
         unset($config['linkto']);
     }
     if (isset($config['menu_levels'])) {
         unset($config['menu_levels']);
     }
     //2.3.2
     if (isset($config['hidegplink'])) {
         //2.4RC2
         if ($config['hidegplink'] === 'hide') {
             $config['showgplink'] = false;
         }
         unset($config['hidegplink']);
     }
     //set values
     $config += common::ConfigDefaults();
     if (isset($GLOBALS['dirPrefix'])) {
         $config['dirPrefix'] = $GLOBALS['dirPrefix'];
         // deprecated 2.4b4 $config['dirPrefix'], $GLOBALS['dirPrefix'] won't always be set (example: cron jobs)
     }
     $config['homepath_key'] = key($gp_menu);
     $config['homepath'] = common::IndexToTitle($config['homepath_key']);
     if (!isset($config['gadgets']['Contact'])) {
         $config['gadgets']['Contact'] = array('script' => '/include/special/special_contact.php', 'class' => 'special_contact_gadget');
     }
     gp_defined('gp_session_cookie', common::SessionCookie($config['gpuniq']));
     //get language file
     common::GetLangFile();
     //upgrade?
     if (version_compare($config['gpversion'], '2.3.4', '<')) {
         includeFile('tool/upgrade.php');
         new gpupgrade();
     }
 }
开发者ID:rizub4u,项目名称:gpEasy-CMS,代码行数:51,代码来源:common.php

示例5: setUP

 function setUP()
 {
     common::GetLangFile();
 }
开发者ID:barbrick,项目名称:gpEasy-CMS,代码行数:4,代码来源:bootstrap.php

示例6: define

<?php

define('is_running', true);
//define('gpdebug',true);
require_once '../common.php';
common::EntryPoint(2, 'update.php');
/* check permissions */
if (!common::LoggedIn()) {
    die('You must be logged in to access this area.');
}
if (!isset($gpAdmin['granted']) || $gpAdmin['granted'] !== 'all') {
    die('Sorry, you do not have sufficient privileges to access this area.');
}
includeFile('tool/update.php');
common::GetLangFile();
$page = new update_class();
gpOutput::HeadContent();
includeFile('install/template.php');
开发者ID:VTAMAGNO,项目名称:gpEasy-CMS,代码行数:18,代码来源:update.php


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