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


PHP MY_Lang::load方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('install');
     $lang->load('main');
     //        $this->host = 'http://' . str_replace('index.php', '', $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']) . 'index.php/';
     $this->load->helper('string');
     $this->load->helper('form_csrf');
     $this->host = reduce_multiples($this->host);
     $this->loadedExt = get_loaded_extensions();
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:12,代码来源:_install.php

示例2: saveSiteMap

 /**
  * Save sitemap
  */
 public function saveSiteMap()
 {
     $lang = new MY_Lang();
     $lang->load('sitemap');
     $successMessage = lang("Site map have been saved", "sitemap");
     $successMessageTitle = lang("Site map have been saved", "sitemap");
     // Get Site Map Data
     $sitemap = file_get_contents(site_url('sitemapRegenerate.xml'));
     if ($sitemap) {
         if (!is_dir($this->site_map_folder_path)) {
             mkdir($this->site_map_folder_path, 0777);
         }
         foreach (glob($this->site_map_folder_path . '/sitemap*') as $site_map_file) {
             chmod($site_map_file, 0777);
             unlink($site_map_file);
         }
         // Create file and puts Site Map data
         if (file_put_contents($this->sitemap_path, $sitemap)) {
             chmod($this->sitemap_path, 0777);
             $this->lib_admin->log($successMessage);
             showMessage($successMessage, $successMessageTitle);
         } else {
             showMessage(lang("Site map have not been saved. Set writing permissions on module folder.", 'sitemap'), lang("Error", "sitemap"), 'r');
         }
     } else {
         showMessage(lang("Site map have not been saved", 'sitemap'), lang("Error", "sitemap"), 'r');
     }
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:31,代码来源:admin.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('search');
     //$this->output->enable_profiler(TRUE);
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:7,代码来源:search.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('pricespy');
     $this->load->library('DX_Auth');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:7,代码来源:admin.php

示例5: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->module('core');
     $lang = new MY_Lang();
     $lang->load('mailer');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:7,代码来源:mailer.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->load->model('cmsemail_model');
     $lang = new MY_Lang();
     $lang->load('cmsemail');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:7,代码来源:cmsemail.php

示例7: init

 /**
  * Init 
  */
 private function init()
 {
     \CMSFactory\assetManager::create()->registerScript('scripts');
     $this->load->model('found_less_expensive_model');
     $lang = new MY_Lang();
     $lang->load('found_less_expensive');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:10,代码来源:admin.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('xforms');
     $this->load->model('xforms_model');
 }
开发者ID:pulse-studio,项目名称:xforms,代码行数:7,代码来源:xforms_widgets.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('wishlist');
     $this->load->helper(array('form', 'url'));
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:7,代码来源:wishlist.php

示例10: load

 public function load($langfile = array(), $lang = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '', $_module = '')
 {
     if (is_array($langfile)) {
         foreach ($langfile as $_lang) {
             $this->load($_lang);
         }
         return $this->language;
     }
     $deft_lang = CI::$APP->config->item('language');
     $idiom = $lang == '' ? $deft_lang : $lang;
     if (in_array($langfile . '_lang' . EXT, $this->is_loaded, TRUE)) {
         return $this->language;
     }
     $_module or $_module = CI::$APP->router->fetch_module();
     list($path, $_langfile) = Modules::find($langfile . '_lang', $_module, 'language/' . $idiom . '/');
     if ($path === FALSE) {
         if ($lang = parent::load($langfile, $lang, $return, $add_suffix, $alt_path)) {
             return $lang;
         }
     } else {
         if ($lang = Modules::load_file($_langfile, $path, 'lang')) {
             if ($return) {
                 return $lang;
             }
             $this->language = array_merge($this->language, $lang);
             $this->is_loaded[] = $langfile . '_lang' . EXT;
             unset($lang);
         }
     }
     return $this->language;
 }
开发者ID:marciocamello,项目名称:qms_entol_net,代码行数:31,代码来源:Lang.php

示例11: parseModules

 /**
  * Get modules locales
  * @return array
  */
 public function parseModules()
 {
     try {
         $modules = new \DirectoryIterator(self::MODULES_PATH);
         foreach ($modules as $module) {
             if ($module->isDir() && !$module->isDot() && is_dir(self::MODULES_PATH . $module->getBasename() . '/language')) {
                 $module_dir = self::MODULES_PATH . $module->getBasename();
                 $language_dir = $module_dir . '/language/';
                 $locales = new \DirectoryIterator($language_dir);
                 foreach ($locales as $locale) {
                     if ($locale->isDir() && !$locale->isDot() && is_dir($language_dir . $locale->getBasename()) && isLocale($locale->getBasename())) {
                         $objLang = new \MY_Lang();
                         $objLang->load($module->getBasename());
                         include $module_dir . '/module_info.php';
                         $menu_name = $com_info['menu_name'] ? $com_info['menu_name'] : $module->getBasename();
                         self::$MODULES_LOCALES[$locale->getBasename()][] = array('module' => $module->getBasename(), 'menu_name' => ucfirst($menu_name));
                         unset($com_info);
                     }
                 }
             }
         }
         return self::$MODULES_LOCALES;
     } catch (Exception $exc) {
         return array();
     }
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:30,代码来源:FilesParser.php

示例12:

 function __construct()
 {
     parent::__construct();
     $this->load->module('core');
     $lang = new MY_Lang();
     $lang->load('imagebox');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:7,代码来源:imagebox.php

示例13: __construct

 /**
  * __construct base object loaded
  * @access public
  * @author DevImageCms
  * @copyright (c) 2013, ImageCMS
  */
 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('mod_discount');
     $this->load->model('discount_model_admin');
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:13,代码来源:mod_discount.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     $lang = new MY_Lang();
     $lang->load('auth');
     $this->initialize();
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:7,代码来源:authapi.php

示例15: parseModules

 /**
  * Get modules locales
  * @return array
  */
 public function parseModules()
 {
     try {
         $modules = getModulesPaths();
         foreach ($modules as $moduleName => $modulePath) {
             $language_dir = $modulePath . 'language/';
             if (!file_exists($language_dir)) {
                 // TODO: Спитати Марка чому в shop нема language =))
                 continue;
             }
             $locales = new \DirectoryIterator($language_dir);
             foreach ($locales as $locale) {
                 if ($locale->isDir() && !$locale->isDot() && is_dir($language_dir . $locale->getBasename()) && isLocale($locale->getBasename())) {
                     $objLang = new \MY_Lang();
                     $objLang->load($moduleName);
                     $module_info = $module_dir . '/module_info.php';
                     $module_info = \get_mainsite_url($module_info);
                     include $module_info;
                     $menu_name = $com_info['menu_name'] ? $com_info['menu_name'] : $moduleName;
                     self::$MODULES_LOCALES[$locale->getBasename()][] = array('module' => $moduleName, 'menu_name' => ucfirst($menu_name));
                     unset($com_info);
                 }
             }
         }
         return self::$MODULES_LOCALES;
     } catch (Exception $exc) {
         return array();
     }
 }
开发者ID:RandomUsernameHere,项目名称:megainfo-corporate-cms,代码行数:33,代码来源:FilesParser.php


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