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


PHP FWLanguage::defaultLangId方法代码示例

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


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

示例1: init

 /**
  * Loads the language config from the database
  *
  * This used to be in __construct but is also
  * called from core/language.class.php to reload
  * the config, so core/settings.class.php can
  * rewrite .htaccess (virtual lang dirs).
  */
 static function init()
 {
     global $_CONFIG, $objDatabase;
     $objResult = $objDatabase->Execute("\n            SELECT id, lang, name, charset, themesid,\n                   frontend, backend, is_default\n              FROM " . DBPREFIX . "languages\n             ORDER BY id ASC");
     if ($objResult) {
         // setting full to true for update
         $full = true;
         while (!$objResult->EOF) {
             self::$arrLanguages[$objResult->fields['id']] = array('id' => $objResult->fields['id'], 'lang' => $objResult->fields['lang'], 'name' => $objResult->fields['name'], 'charset' => $objResult->fields['charset'], 'themesid' => $objResult->fields['themesid'], 'frontend' => $objResult->fields['frontend'], 'backend' => $objResult->fields['backend'], 'is_default' => $objResult->fields['is_default'], 'fallback' => '');
             if (!$full && $objResult->fields['is_default'] != 'true') {
                 self::$arrLanguages[$objResult->fields['id']]['frontend'] = 0;
                 self::$arrLanguages[$objResult->fields['id']]['backend'] = 0;
             }
             if ($objResult->fields['is_default'] == 'true') {
                 self::$defaultLangId = $objResult->fields['id'];
             }
             $objResult->MoveNext();
         }
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:28,代码来源:Language.class.php

示例2: init

 /**
  * Loads the language config from the database
  *
  * This used to be in __construct but is also
  * called from core/language.class.php to reload
  * the config, so core/settings.class.php can
  * rewrite .htaccess (virtual lang dirs).
  */
 static function init()
 {
     global $_CONFIG, $objDatabase;
     $objResult = $objDatabase->Execute("\n            SELECT id, lang, name, charset, themesid,\n                   frontend, backend, is_default, fallback\n              FROM " . DBPREFIX . "languages\n             ORDER BY id ASC");
     if ($objResult) {
         $license = \Cx\Core_Modules\License\License::getCached($_CONFIG, $objDatabase);
         $license->check();
         $full = $license->isInLegalComponents('fulllanguage');
         while (!$objResult->EOF) {
             self::$arrLanguages[$objResult->fields['id']] = array('id' => $objResult->fields['id'], 'lang' => $objResult->fields['lang'], 'name' => $objResult->fields['name'], 'charset' => $objResult->fields['charset'], 'themesid' => $objResult->fields['themesid'], 'frontend' => $objResult->fields['frontend'], 'backend' => $objResult->fields['backend'], 'is_default' => $objResult->fields['is_default'], 'fallback' => $objResult->fields['fallback']);
             if (!$full && $objResult->fields['is_default'] != 'true') {
                 self::$arrLanguages[$objResult->fields['id']]['frontend'] = 0;
                 self::$arrLanguages[$objResult->fields['id']]['backend'] = 0;
             }
             if ($objResult->fields['is_default'] == 'true') {
                 self::$defaultLangId = $objResult->fields['id'];
             }
             $objResult->MoveNext();
         }
     }
 }
开发者ID:Niggu,项目名称:cloudrexx,代码行数:29,代码来源:Language.class.php


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