/data0/htdocs/site-yinhe/yincart.com/frontend/modules/translate/components/Ei18n.php(271)
259 */ 260 public function getLanguage() 261 { 262 if ($this->_language !== null) 263 return $this->_language; 264 elseif (Yii::app()->getSession()->contains($this->getId())) 265 $language = Yii::app()->getSession()->get($this->getId()); 266 elseif (Yii::app()->request->getParam($this->languageParameter)) 267 $language = Yii::app()->request->getParam($this->languageParameter); 268 else 269 $language = Yii::app()->getRequest()->getPreferredLanguage(); 270 271 if (!key_exists($language, $this->languages)) 272 { 273 if ($language === Yii::app()->sourceLanguage) 274 $language = $this->defaultLanguage; 275 elseif (strpos($language, "_") !== false) 276 { 277 $language = substr($language, 0, 2); 278 if (!key_exists($language, $this->languages)) 279 $language = $this->defaultLanguage; 280 } 281 } 282 $this->_language = $language; 283
#0 |
+
–
/data0/htdocs/site-yinhe/yincart.com/frontend/modules/translate/components/Ei18n.php(271): key_exists(false, array("en" => "English", "de" => "German", "zh_cn" => "Chinese", "en_us" => "America", ...)) 266 elseif (Yii::app()->request->getParam($this->languageParameter)) 267 $language = Yii::app()->request->getParam($this->languageParameter); 268 else 269 $language = Yii::app()->getRequest()->getPreferredLanguage(); 270 271 if (!key_exists($language, $this->languages)) 272 { 273 if ($language === Yii::app()->sourceLanguage) 274 $language = $this->defaultLanguage; 275 elseif (strpos($language, "_") !== false) 276 { |
#1 |
+
–
/data0/htdocs/site-yinhe/yincart.com/frontend/modules/translate/components/Ei18n.php(103): Ei18n->getLanguage() 098 099 if (empty($this->languageParameter)) 100 $this->languageParameter = 'lang'; 101 102 if ($this->autoSetLanguage) 103 $this->setLanguage($this->getLanguage()); 104 105 if (!count($this->languages)) 106 { 107 if (($sourceLanguage = Yii::app()->sourceLanguage) !== null) 108 $this->languages[$sourceLanguage] = $sourceLanguage; |
#2 |
+
–
/data0/yii/framework/base/CModule.php(387): Ei18n->init() 382 if(!isset($config['enabled']) || $config['enabled']) 383 { 384 Yii::trace("Loading \"$id\" application component",'system.CModule'); 385 unset($config['enabled']); 386 $component=Yii::createComponent($config); 387 $component->init(); 388 return $this->_components[$id]=$component; 389 } 390 } 391 } 392 |
#3 |
+
–
/data0/yii/framework/base/CModule.php(523): CModule->getComponent("translate") 518 * Loads static application components. 519 */ 520 protected function preloadComponents() 521 { 522 foreach($this->preload as $id) 523 $this->getComponent($id); 524 } 525 526 /** 527 * Preinitializes the module. 528 * This method is called at the beginning of the module constructor. |
#4 |
+
–
/data0/yii/framework/base/CApplication.php(152): CModule->preloadComponents() 147 $this->initSystemHandlers(); 148 $this->registerCoreComponents(); 149 150 $this->configure($config); 151 $this->attachBehaviors($this->behaviors); 152 $this->preloadComponents(); 153 154 $this->init(); 155 } 156 157 |
#5 |
+
–
/data0/yii/framework/YiiBase.php(125): CApplication->__construct(array("basePath" => "/data0/htdocs/site-yinhe/yincart.com/frontend/config/..", "name" => "Yincart@Yii开源商城", "theme" => "default", "params" => array("cache.core" => array("class" => "CDbCache", "connectionID" => "db", "autoCreateCacheTable" => true, "cacheTableName" => "cache"), "cache.content" => array("class" => "CDbCache", "connectionID" => "db", "autoCreateCacheTable" => true, "cacheTableName" => "cache"), "url.rules" => array("page/<key:\w+>" => "page/index", "catalog/<key:\w+>" => "catalog/index", "list/<category_id:\d+>" => "item/index", "item-list-<key:\w+>" => "item/list", ...), "php.exePath" => "/usr/bin/php", ...), ...)) 120 * to the constructor of the application class. 121 * @return mixed the application instance 122 */ 123 public static function createApplication($class,$config=null) 124 { 125 return new $class($config); 126 } 127 128 /** 129 * Returns the application singleton or null if the singleton has not been created yet. 130 * @return CApplication the application singleton, null if the singleton has not been created yet. |
#6 |
+
–
/data0/htdocs/site-yinhe/yincart.com/frontend/www/index.php(37): YiiBase::createApplication("WebApplication", array("basePath" => "/data0/htdocs/site-yinhe/yincart.com/frontend/config/..", "name" => "Yincart@Yii开源商城", "theme" => "default", "params" => array("cache.core" => array("class" => "CDbCache", "connectionID" => "db", "autoCreateCacheTable" => true, "cacheTableName" => "cache"), "cache.content" => array("class" => "CDbCache", "connectionID" => "db", "autoCreateCacheTable" => true, "cacheTableName" => "cache"), "url.rules" => array("page/<key:\w+>" => "page/index", "catalog/<key:\w+>" => "catalog/index", "list/<category_id:\d+>" => "item/index", "item-list-<key:\w+>" => "item/list", ...), "php.exePath" => "/usr/bin/php", ...), ...)) 32 $config = require('frontend' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'main.php'); 33 require_once('common' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'WebApplication.php'); 34 require_once('common' . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'global.php'); 35 36 37 $app = Yii::createApplication('WebApplication', $config); 38 39 /* please, uncomment the following if you are using ZF library */ 40 /* 41 Yii::import('common.extensions.EZendAutoloader', true); 42 |